发布于 2017-05-31 01:55:23 | 227 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

npm Node.js包管理工具

npm是 Node.js 的包管理工具,用来安装各种 Node.js 的扩展。


npm 5 有了很大的进步,在几乎所有常见的情况下显著地改进了其性能,修复了很多由架构导致的旧的错误,使其更稳定和具有更好的容错性。这对于需要一致性/安全保证的用户是个好消息,新版还为 git 依赖提供了语义化支持。

重大变更:

  • 现有的 npm 缓存将不再使用:您将不得不重新下载全部缓存的软件包。没有任何工具或意图重新使用旧的缓存 (#15666)

  • 不要再使用大写的 npm(npm will now scold you if you capitalize its name. seriously it will fight you.)

  • npm will --save by default now。另外,除非 npm-shrinkwrap.json 存在,否则package-lock.json 将会自动创建 (#15666)

  • 通过 user/repo#semver:^1.2.3,Git 依赖支持语义化 (#15308) (#15666) (@sankethkatta)

  • 移除 Stub 文件 (#16204) (@watilde)

  • “extremely legacy” _token couchToken 已被移除 (#12986)

  • npm install ./packages/subdir will now create a symlink instead of a regular installation. file://path/to/tarball.tgz will not change – only directories are symlinked. (#15900)

  • Git dependencies with prepare scripts will have their devDependencies installed, and npm install run in their directory before being packed.

  • npm cache commands have been rewritten and don’t really work anything like they did before. (#15666)

  • --cache-min and --cache-max have been deprecated. (#15666)

  • Running npm while offline will no longer insist on retrying network requests. npm will now immediately fall back to cache if possible, or fail. (#15666)

  • package locks no longer exclude optionalDependencies that failed to build. This means package-lock.json and npm-shrinkwrap.json should now be cross-platform. (#15900)

  • If you generated your package lock against registry A, and you switch to registry B, npm will now try to install the packages from registry B, instead of A. If you want to use different registries for different packages, use scope-specific registries (npm config set @myscope:registry=https://myownregist.ry/packages/). Different registries for different unscoped packages are not supported anymore.

  • Shrinkwrap and package-lock no longer warn and exit without saving the lockfile.

  • Local tarballs can now only be installed if they have a file extensions .tar.tar.gz, or .tgz.

  • A new loglevel, notice, has been added and set as default.

  • One binary to rule them all: ./cli.js has been removed in favor of ./bin/npm-cli.js. In case you were doing something with ./cli.js itself. (#12096) (@watilde)

详情请参阅发布主页



历史版本 :
npm v5.6.0 发布,Node.js 的包管理工具
npm v5.1.0 发布,加倍提升速度
npm v5.0.0 正式发布,改进了稳定性
Node.js 包管理工具 npm v4.0 发布,重磅更新
npm v2.15.10 发布,Node.js 包管理工具
npm v2.15.6 发布,Node.js 包管理工具
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务