diff --git a/src/app/atom-package.coffee b/src/app/atom-package.coffee index bff8c2270..9a3c4487b 100644 --- a/src/app/atom-package.coffee +++ b/src/app/atom-package.coffee @@ -137,6 +137,8 @@ class AtomPackage extends Package return unless @metadata.activationEvents? if _.isArray(@metadata.activationEvents) rootView.command(event, @handleActivationEvent) for event in @metadata.activationEvents + else if _.isString(@metadata.activationEvents) + rootView.command(@metadata.activationEvents, @handleActivationEvent) else rootView.command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents diff --git a/src/packages/command-palette/package.cson b/src/packages/command-palette/package.cson index 3a7efa550..8559dddc2 100644 --- a/src/packages/command-palette/package.cson +++ b/src/packages/command-palette/package.cson @@ -1,3 +1,3 @@ 'main': './lib/command-palette-view' 'description': 'Find and run available commands.' -'activationEvents': ['command-palette:toggle'] +'activationEvents': 'command-palette:toggle' diff --git a/src/packages/github-sign-in/package.cson b/src/packages/github-sign-in/package.cson index b11a4ec27..978b80e99 100644 --- a/src/packages/github-sign-in/package.cson +++ b/src/packages/github-sign-in/package.cson @@ -1,5 +1,3 @@ 'main': './lib/sign-in-view' 'description': 'Sign in to GitHub. Open from the command palette.' -'activationEvents': [ - 'github:sign-in' -] +'activationEvents': 'github:sign-in' diff --git a/src/packages/grammar-selector/package.cson b/src/packages/grammar-selector/package.cson index 617163821..8ffd582d0 100644 --- a/src/packages/grammar-selector/package.cson +++ b/src/packages/grammar-selector/package.cson @@ -1,3 +1,3 @@ 'main': './lib/grammar-selector' 'description': 'Select the grammar to use for the current editor.' -'activationEvents': ['grammar-selector:show'] +'activationEvents': 'grammar-selector:show' diff --git a/src/packages/package-generator/package.cson b/src/packages/package-generator/package.cson index cb97b414c..6a6467efd 100644 --- a/src/packages/package-generator/package.cson +++ b/src/packages/package-generator/package.cson @@ -1,3 +1,3 @@ 'main': './lib/package-generator' 'description': 'Generate and open a new sample package.' -'activationEvents': ['package-generator:generate'] +'activationEvents': 'package-generator:generate'