From 00b79e69f195e0973ac0dacca1c11023b9800d37 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Sun, 1 Feb 2015 08:29:21 -0800 Subject: [PATCH 1/5] :memo: activationEvents are now activationCommands --- docs/creating-a-package.md | 2 +- docs/your-first-package.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/creating-a-package.md b/docs/creating-a-package.md index fed5cfb2a..cfedd62b2 100644 --- a/docs/creating-a-package.md +++ b/docs/creating-a-package.md @@ -51,7 +51,7 @@ in the _menus_ directory are added alphabetically. - `snippets` (**Optional**): an Array of Strings identifying the order of the snippets your package needs to load. If not specified, snippets in the _snippets_ directory are added alphabetically. -- `activationEvents` (**Optional**): an Array of Strings identifying events that +- `activationCommands` (**Optional**): an Array of Strings identifying commands that trigger your package's activation. You can delay the loading of your package until one of these events is triggered. - `providedServices` (**Optional**): an Object describing the services that your diff --git a/docs/your-first-package.md b/docs/your-first-package.md index 578ca9f50..eb882abc7 100644 --- a/docs/your-first-package.md +++ b/docs/your-first-package.md @@ -72,12 +72,12 @@ command palette or by pressing `ctrl-alt-cmd-l`. Now open the command panel and search for the `ascii-art:convert` command. But it's not there! To fix this, open _package.json_ and find the property called -`activationEvents`. Activation Events speed up load time by allowing Atom to +`activationCommands`. Activation Events speed up load time by allowing Atom to delay a package's activation until it's needed. So remove the existing command -and add `ascii-art:convert` to the `activationEvents` array: +and add `ascii-art:convert` to the `activationCommands` array: ```json -"activationEvents": ["ascii-art:convert"], +"activationCommands": ["ascii-art:convert"], ``` First, reload the window by running the command `window:reload`. Now when you From 6eed4e461f97db4d581c0c87dfbf7f1dc755012a Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Sun, 1 Feb 2015 08:35:57 -0800 Subject: [PATCH 2/5] :memo: Give stronger recommendation on deactivate Many packages don't clean up properly on update, causing strange behavior until restart. Simply stating that the `deactivate` method is optional is enough to let people know that it isn't required for the common case. --- docs/creating-a-package.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/creating-a-package.md b/docs/creating-a-package.md index cfedd62b2..2343c0010 100644 --- a/docs/creating-a-package.md +++ b/docs/creating-a-package.md @@ -98,9 +98,9 @@ module's `activate` method so you can restore your view to where the user left off. - `deactivate()`: This **optional** method is called when the window is shutting -down. If your package is watching any files or holding external resources in any -other way, release them here. If you're just subscribing to things on window, -you don't need to worry because that's getting torn down anyway. +down, or when your package is being updated or disabled. If your package is +watching any files, holding external resources, providing commands or subscribing +to events release them here. ### Simple Package Code From 959aa08d62b5631fc6730bcdb7f937cf8bf9fec1 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Sun, 1 Feb 2015 08:44:48 -0800 Subject: [PATCH 3/5] :memo: Atom 1.0 API is now frozen --- docs/creating-a-package.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/creating-a-package.md b/docs/creating-a-package.md index 2343c0010..7a7c13c03 100644 --- a/docs/creating-a-package.md +++ b/docs/creating-a-package.md @@ -127,12 +127,11 @@ module.exports = serialize: -> # ... ``` -Beyond this simple contract, your package has access to Atom's API. Be aware -that since we are early in development, APIs are subject to change and we have -not yet established clear boundaries between what is public and what is private. -Also, please collaborate with us if you need an API that doesn't exist. Our goal -is to build out Atom's API organically based on the needs of package authors -like you. +Beyond this simple contract, your package has access to [Atom's API][api]. Be aware +that the Atom 1.0 API is mostly frozen. Refer to the API documentation for what +is public. That said, please collaborate with us if you need an API that doesn't +exist. Our goal is to build out Atom's API organically based on the needs of +package authors like you. ## Style Sheets @@ -490,6 +489,7 @@ registry. Run `apm help publish` to see all the available options and `apm help` to see all the other available commands. +[api]: https://atom.io/docs/api/latest [file-tree]: https://github.com/atom/tree-view [status-bar]: https://github.com/atom/status-bar [cs-syntax]: https://github.com/atom/language-coffee-script From 23b8b152618ab70c2cc6bf20dc63e2190d23bb19 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Sun, 1 Feb 2015 10:07:46 -0800 Subject: [PATCH 4/5] :memo: Fix broken json-schema.org link --- src/config.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.coffee b/src/config.coffee index 7b925a32b..d9695fb55 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -83,7 +83,7 @@ ScopeDescriptor = require './scope-descriptor' # # ## Config Schemas # -# We use [json schema](json-schema.org) which allows you to define your value's +# We use [json schema](http://json-schema.org) which allows you to define your value's # default, the type it should be, etc. A simple example: # # ```coffee From 800ca5a37adbdca137ee41ea1834e6e0e13d0eb3 Mon Sep 17 00:00:00 2001 From: Lee Dohm Date: Mon, 2 Feb 2015 17:19:07 -0800 Subject: [PATCH 5/5] :memo: Add a missing comma --- docs/creating-a-package.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/creating-a-package.md b/docs/creating-a-package.md index 7a7c13c03..a6265e7b0 100644 --- a/docs/creating-a-package.md +++ b/docs/creating-a-package.md @@ -100,7 +100,7 @@ off. - `deactivate()`: This **optional** method is called when the window is shutting down, or when your package is being updated or disabled. If your package is watching any files, holding external resources, providing commands or subscribing -to events release them here. +to events, release them here. ### Simple Package Code