install-auto
Auto installs npm dependencies from the script you want to run and runs the script
npm install install-auto
Usage
First install install-auto
npm install -g install-auto
Then make a script that uses some dependencies
const hypercore =console
Then simply run the script with install-auto
.
It will npm install
or yarn add
any deps used by the script if they are not resolvable already.
## use defaultinstall-auto my-script.js## use yarninstall-auto my-script.js -r https://registry.npm.taobao.org -t yarn
config
param | action |
---|---|
-r |
set registry(npm/cnpm) |
-t |
set tool(npm/yarn/cnpm) |
License
MIT