npm --save 選項作用


npm --save 選項作用

學習了:https://segmentfault.com/q/1010000000403629

-save和save-dev可以省掉你手動修改package.json文件的步驟。
spm install module-name -save 自動把模塊和版本號添加到dependencies部分
spm install module-name -save-dve 自動把模塊和版本號添加到devdependencies部分

 看了api,感覺好像不太用了;

-P, --save-prod: Package will appear in your dependencies. This is the default unless -D or -O are present.

-D, --save-dev: Package will appear in your devDependencies.

-O, --save-optional: Package will appear in your optionalDependencies.

--no-save: Prevents saving to dependencies.

這個應該跟npm的版本有關系;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM