当初始化 package.json
可以执行
npm init -y
复制代码
会得到如下结果
npm set init.license "MIT"
npm set init.author.email "[email protected]"
npm set init.author.name "Yun.kou"
复制代码
删除 package.json
再来一遍
rm package.json
npm init -y
复制代码
可以看到设置的默认值
如果你想看默认值和编辑可以查看~/.npmrc
vim ~/.npmrc
复制代码