atrun
Auto installs npm/yarn dependencies from the script you want to run and runs the script
atrun ---> auto run
npm install atrun
Usage
First install atrun
npm install -g atrun
Then make a script that uses some dependencies
const hypercore = require('hypercore')
console.log('hypercore is', hypercore)
Then simply run the script with atrun
.
It will npm install
or yarn add
any deps used by the script if they are not resolvable already.
atrun my-script.js
atrun 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