This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 682
Package Activation
Even Stensberg edited this page Mar 24, 2017
·
2 revisions
This page discusses how to activate (and deactivate) Nuclide packages.
- Export
activate
anddeactivate
functions fromlib/main.js
- Export any other functions needed by the service declarations in
package.json
- There's no need for an
Activation
class for simple packages - Type the package's disposables collection (named
subscriptions
) with(null: any)
- As much as possible, lazy-load
require
calls to invoke business logic of the package
When using require
to have a command invoke core logic of the package, wrap it in an arrow function.
atom.commands.add('atom-workspace' 'your-package:command', e => {
require('./your-package-utils').commandMethod(e);
});