requireomat
v1.1.1
Published
keeps your installed dependencies in sync with the require'd modules in your code.
Downloads
9
Maintainers
Readme
requireomat
keeps your installed dependencies in sync with the require'd modules in your code.
Tired of these messages?
__Error: Cannot find module 'wtf@&!#'__
requireomat to the rescue! hassle free installing of your required modules.
install
install it globally, you won't regret it. it is really useful for every module you develop.
npm install -g requireomat
usage
- make sure you have got a package.json
- write your code (you don't have to do any
npm install
- before you run your code, run:
requireomat
in the root directory of your project. - done.
how does it work
requireomat
follows this workfow (taken from code)
series([
remove, // 0. optional option remove: remove the whole node_modules folder (just to make sure)
unused, // 1. remove unused dependencies from file system and package.json
install, // 2. install the defined dependencies
missing, // 3. install missing dependencies
version, // 4. update package.json with installed version
done // 5. say good bye, call callback
]);
options
you can run requireomat
from the command line as well as from your node.js code.
available options:
- verbose (alias: n)
- dryrun
- remove
- withoutDev
- ignoreDirs
- ignoreMatches
- ignorePackages
- saveDev
- ignoreVersion
- dir
command line
command line options are handled with subarg.
# dryrun without action, only report
requireomat -n
# fix installs in the current directory
requireomat
# run with verbose logs
requireomat --verbose
# check installs in a neighbour project (dir option)
requireomat ../my-friends-project --dryrun
node.js
var requireomat = require('requireomat');
var options = {
"dryrun": true,
"dir": "/my/computer/my-project",
"withoutDev": false,
"ignoreDirs": [
"sandbox",
"dist",
"bower_components"
],
"ignore": [
"sandbox",
"dist",
"bower_components"
],
"ignoreMatches": [],
"ignorePackages": []
}
requireomat(options);
license
MIT