javascript - Node.js package.json script code uses local or global libraries? -
while installing using node,
will script code in package.json use local node_modules or global one?
for instance here below, use global browserify(npm install -g
) module or locally installed one? available in ./node_modules/bin
"scripts": { "start": "watchify -o js/bundle.js -v -d .", "build": "browserify . | uglifyjs -cm > js/bundle.min.js" }
package.json uses local modules found in same root directory (node_modules dir default) node script resides (or configure in package.json)
if module installed globally uses global one.
please read here: http://browsenpm.org/help
the -g flag indicate http-server should installed globally, , available node scripts require.
Comments
Post a Comment