npm-script-flatten
v0.2.0
Published
flatten npm script
Downloads
21
Readme
npm-script-flatten
npm-script-flatten
is a small tool for flattening npm script.
usage
npm install -g npm-script-flatten
npm-script-flatten deploy # your script to be flattened
example
For example, npm script deploy
defined in package.json
"scripts": {
"deploy": "npm run build-ios --test && npm run build-android && npm run deploy-remote",
"build": "npm run build-ios && npm run build-android",
"build-ios": "cp index.js index.io.js",
"build-android": "cp index.js ios.android.js",
"deploy-remote": "cp index.*.js /tmp"
}
When we run npm-script-flatten deploy
, you will get the commands actually run.
cp index.js index.io.js --test
cp index.js ios.android.js
cp index.*.js /tmp