When Atom finishes loading, it will dispatch.
commands
(default: [])devCommands
(default: [])
This package provides a service that you can use in other Atom packages.
Then, in your package's main module, call methods on the service:
module.exports =
config:
autoRun:
type: 'boolean'
default: false
description: 'Requirement: auto-run package'
activate: ->
@subscriptions = new CompositeDisposable
@subscriptions.add atom.commands.add 'atom-workspace',
'my-package:start': => @start()
activateConfig: ->
pack = atom.packages.getActivePackage('auto-run')
return unless pack
autoRun = pack.mainModule.provideAutoRun()
autoRun.registerCommand(
keyPath: 'my-package.autoRun'
command: 'my-package:start'
)
package.json
{
"name": "my-package",
"activationCommands": {
"atom-workspace": ["my-package:start"]
}
}