自動的にデフォルトのNPMを設定するためのプロジェクトを作成する方法

文化的背景

  • NodeJs
  • NPM

NodeJsプロジェクトの作成

mkdir my-pro && cd my-pro
npm init -y

デフォルトの設定ファイルは自動的にpackage.jsonに生成され、
自動的に構成したコンテンツに実際に自動的にそれを埋めるためにしたいですか?

コンフィギュレーション

npm config set init.author.name = xxx // 配置名称
npm config set init.author.eamil = xxx //配置邮箱
npm config set init.author.url = xxx // 配置个人网址
npm config set init.license = xxx // 配置协议

ビューの設定

npm config list //查看基本配置
npm config list -l //查看所有配置

参照

  1. NPM-config設定
  2. package.jsonファイルの作成

おすすめ

転載: www.cnblogs.com/zhourongcode/p/12466795.html