Case 1: used instead of value
package.json: { "name": "example", "config": { "url": "localhost/dev" }, "scripts": { "watch": "browser-sync start --files \"./**/*, !.node_modules/, !src\" --proxy $npm_package_config_url" } }
$npm run watch opens http://localhost:3000/$npm_package_config_url in the browser instead of http://localhost:3000/dev
So $npm_package_config_url used as a string, not as a variable.
Case 2: team replacement does not work
{ { ... }, "scripts": { "rm:all": "npm rm $(ls -1 node_modules | tr '/\\n' ' ')" } }
The sub-command lists the folders in node_modules.
Again, npm run rm:all does nothing, because $(ls -1 node_modules | tr '/\\n' ' ') interpreted as the name of the folder.
ENV: windows 10 | npm 3.5.1 | node 4.2.2 | git - bash 2.6.0
source share