Utility to load an Atom package that is packaged as a Node package
Package to register Atom-specific Node packages.
This global registry prevents Node packages from triggering side effects multiple times (e.g. adding stylesheets, registering keybindings). Note that this also prevents different Atom packages from using different versions of the Node package.
The first argument is the root path of your package's code (the path to
The second argument is the path to what you'd normally put in
value also functions as a key -- calling
require() on the package will return
the first package that was registered with this key.
This approach prevents Node from having to evaluate the implementation multiple
times and allows it to load resources from
(Other directories, such as
keymaps/, are future work.)
moduleexports = ;
Add the dependency in
package.json as usual:
"name": "nuclide-buck-toolbar""engines":"atom": ">0.193.0""dependencies":"nuclide-ui-atom-input": "0.0.0"
Require the package as usual:
var AtomInput = ;moduleexports = React;