[NPM] Set default values for package.json using npm set

Npm by default uses global values when initializing a new package.json file. Learn how to set your own global default values by command line or editing the ~/.npmrc file.

 
npm set init.author.email "xxx@gmail.com"
npm set init.author.name "XXX"
npm set init.license "MIT"

 

Run:

npm init -y

Should bring all the init default value for you.

posted @ 2018-10-22 19:43  Zhentiw  阅读(141)  评论(0编辑  收藏  举报