Repository (npm) manager for the Ender CLI
Want to see pretty graphs? Log in now!
npm install ender-repository
|16||downloads in the last day|
|45||downloads in the last week|
|561||downloads in the last month|
|Last Published By|
|Version||1.0.3 last updated 2 months ago|
|Dependents||ender, ender-installer, ender-package|
The important parts are the
packup() methods which must wrap around any call to an npm command. If you don't do a
setup() then you'll get an error, if you don't do a
packup() then you'll likely have a hanging-process.
These two methods manage npm initialisation and also manage an npm logfile that goes into /tmp/endernpm... If
packup() is called with a falsy first arg then the log file is deleted, otherwise it is left alone for debugging.
Note that multiple npm commands can be run between
packup(), they only need to be done once per app execute.
This repository may be used as a base for providing additional (non-npm) repositories for the Ender CLI.
For more information check out http://ender.jit.su
setup() must be called prior to performing any repository operations. It will also create a 'node_modules' directory in the current working directory if one doesn't already exist. If it has previously been called within the current executing process the callback will be executed immediately.
packup() should be called when the repository is no longer required. The
wasError boolean argument is used to dictate whether the log file collected from the underlying repository, npm, should be kept, otherwise it is automatically removed.
search() is a simple interface to the standard npm search command.
Note that this is a generic npm search, not a specific Ender search, the filtering is done upstream (at the moment).
install() will install the given packages from npm. The callback is given an object containing properties for the installed
pretty version of the tree and a list of
installed packages resulting from the command.
uninstall() uninstalls the given packages using npm.
If you install with
npm install ender-repository -g (why would you?) then you'll get an
ender-repository executable that will perform
Contributions are more than welcome! Just fork and submit a GitHub pull request! If you have changes that need to be synchronized across the various Ender CLI repositories then please make that clear in your pull requests.
Ender Repository uses Buster for unit testing. You'll get it (and a bazillion unnecessary dependencies) when you
npm install in your cloned local repository. Simply run
npm test to run the test suite.
Ender Repository is Copyright (c) 2012 @rvagg, @ded, @fat and other contributors. It is licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.