0.2.0 • Published 5 years ago

npm-script-flatten v0.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

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