What does the npm -i flag mean?

前端 未结 2 1071
庸人自扰
庸人自扰 2021-01-31 00:55

What\'s does the \"i\" flag do in npm?

I saw it used like this:

npm i backbone.marionette

I looked in the npm documentation and searched fo

2条回答
  •  迷失自我
    2021-01-31 01:33

    the i flag is for install. From documentation:

    npm install
    npm install 
    npm install @
    npm install @
    npm install @
    npm install 
    npm install 
    npm install 
    npm install 
    npm install /
    
    Can specify one or more: npm install ./foo.tgz bar@stable /some/folder
    If no argument is supplied and ./npm-shrinkwrap.json is 
    present, installs dependencies specified in the shrinkwrap.
    Otherwise, installs dependencies from ./package.json.
    

    Refer official document for more information here

提交回复
热议问题