This repository was archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 681
Package Activation
Even Stensberg edited this page Mar 24, 2017
·
2 revisions
This page discusses how to activate (and deactivate) Nuclide packages.
- Export
activateanddeactivatefunctions fromlib/main.js - Export any other functions needed by the service declarations in
package.json - There's no need for an
Activationclass for simple packages - Type the package's disposables collection (named
subscriptions) with(null: any) - As much as possible, lazy-load
requirecalls 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);
});