Skip to content

Instantly share code, notes, and snippets.

@Chunlin-Li
Last active February 4, 2016 15:23
Show Gist options
  • Save Chunlin-Li/fac7a8ac85741fc78014 to your computer and use it in GitHub Desktop.
Save Chunlin-Li/fac7a8ac85741fc78014 to your computer and use it in GitHub Desktop.
npm package management ( publish update .... )

发布

  1. 需要 npm 帐号, 如果没有先去官网申请一个, 然后在本地 npm adduser 的时候输入已经注册的用户名和密码即可通过验证.
  2. 在要上传的模块路径下, 检查 package.json 文件, 尽量完善一下其中的信息. 以便更多的人看到.
  3. 使用 npm publish 即可完成发布. 注意命名不要冲突了.

依赖

dependencies are installed on both:
npm install from a directory that contains package.json npm install $package on any other directory

devDependencies are:
npm install on a directory that contains package.json, unless you pass the --production flag
not installed on npm install $package on any other directory, unless you give it the --dev option.

stack overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment