Last active
February 28, 2018 08:09
-
-
Save Gyumeijie/6fa83ca9fbc264c45cb15e189f642ae5 to your computer and use it in GitHub Desktop.
npm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run-script <command> [--silent] [-- <args>...] alias: npm run | |
Given the following package.json snippet: | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build": "babel src -d dist", | |
"run": "node dist/main.js" | |
} | |
To run 'build', we should use `npm run-script build`, but not `npm build`, | |
npm build is a npm cli command and if we want to run 'run', we should use | |
npm run-script run. | |
Note: `build` and `run` are scripts for npm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment