npm.io
1.0.2 • Published 5 years agoCLI

install-auto

Licence
MIT
Version
1.0.2
Deps
2
Size
4 kB
Vulns
0
Weekly
0

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 = require('hypercore')
console.log('hypercore is', hypercore)

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 default
install-auto my-script.js

## use yarn
install-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