Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "-s" in "npm run -s build"

Tags:

npm

What's the purpose of an "-s" flag in "npm run -s build"? I've searched in npm docs, but can't find, Is this an alias for "--silent" flag?

like image 763
shafkathullah Avatar asked Dec 14 '17 12:12

shafkathullah


People also ask

What does S mean in npm?

The flag -s stands for "silent" and is applied to npm , not to the command in the dev script. The -s flag prevents npm from screaming at you when the command exits with a non-zero status, i.e. when the command fails.

What is run in npm?

npm run sets the NODE environment variable to the node executable with which npm is executed. If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install , just in case you've forgotten.


1 Answers

According to: https://github.com/npm/npm/blob/5e426a78ca02d0044f8dd26e0c5f881217081cbd/doc/misc/npm-config.md

Shorthands and Other CLI Niceties
-s, --silent: --loglevel silent
like image 109
Nicolae Natea Avatar answered Oct 12 '22 23:10

Nicolae Natea