Add activationEvents deprecation warning

This commit is contained in:
Nathan Sobo 2014-12-03 12:00:47 -07:00
parent 19ae78e062
commit 53b538311e

View File

@ -408,6 +408,15 @@ class Package
@activationCommands[selector].push(commands...)
if @metadata.activationEvents?
deprecate """
Use `activationCommands` instead of `activationEvents` in your package.json
Commands should be grouped by selector as follows:
```coffee
activationCommands:
"atom-workspace": ["foo:bar", "foo:baz"]
"atom-text-editor": ["foo:quux"]
```
"""
if _.isArray(@metadata.activationEvents)
for eventName in @metadata.activationEvents
@activationCommands['atom-workspace'] ?= []