nppi
v1.0.0
Published
parses .js files finding required/imported packages, then it install them. Useful if you have downloaded some piece of code without any package.json
Downloads
2
Maintainers
Readme
Node Packages Parser Installer
nppi
is a tool that lets you parse files searching for their dependencies and install them.
Really useful if you have downloaded a project or a file without its package.json
.
Super useful if you have downloaded a huge gulpfile.js
from some gist.
Install
npm install nppi -g
Usage
nppi <pattern> [options]
Options
--save
adds the packages to a package.json (you have to create it before, npm init
)
--save-dev
adds the packages to a package.json as dev-dependencies
Blacklist
Files contained in node_modules
and bower_components
will never be parsed.
Examples
nppi ./*.js # parses every .js file in the current folder
nppi ./project/**/*.jsx # parses project folder and all folders inside it looking for .jsx files
nppi gulpfile.js --save-dev # parses gulpfile.js file only, updates package.json
nppi **/*.js --save # parses current folder and all folders inside it, updates package.json