zl程序教程

您现在的位置是:首页 >  前端

当前栏目

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

setnpmJSONJSON for Using package Default
2023-09-14 08:59:17 时间

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.