What is the meaning of npm init -y

Viewed 8275

Please I would love to know the meaning of the flag -y. I noticed it is used in setting up an npm project, but what exactly does it mean?

npm init -y
2 Answers

The -y flag when passed to NPM commands tells the generator to use the defaults instead of asking questions.

npm init -y

will simply generate an empty npm project without going through an interactive process.

The -y stands for yes. More about npm-init here

from npm help init:

   Generate it without having it ask any questions:

     $ npm init -y
Related