返回介绍

npm

发布于 2019-05-30 13:06:32 字数 3262 浏览 1228 评论 0 收藏 0

javascript package manager

概要

npm <command> [args]

VERSION

@VERSION@

详情

npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently.

It is extremely configurable to support a wide variety of use cases. Most commonly, it is used to publish, discover, install, and develop node programs.

Run npm help to get a list of available commands.

IMPORTANT

npm is configured to use npm, Inc.'s public registry at INTRODUCTION

You probably got npm because you want to install stuff.

Use npm install blerg to install the latest version of "blerg". Check out DEPENDENCIES

If a package references to another package with a git URL, npm depends on a preinstalled git.

If one of the packages npm tries to install is a native node module and requires compiling of C++ Code, npm will use DIRECTORIES

See DEVELOPER USAGE

If you're using npm to develop and publish your code, check out the following help topics:

  • json: Make a package.json file. See Configuration

    npm is extremely configurable. It reads its configuration options from 5 places.

    • Command line switches: Set a config with --key val. All keys take a value, even if they are booleans (the config parser doesn't know what the options are at the time of parsing). If no value is provided, then the option is set to boolean true.
    • Environment Variables: Set any config by prefixing the name in an environment variable with npm_config_. For example, export npm_config_key=val.
    • User Configs: The file at $HOME/.npmrc is an ini-formatted list of configs. If present, it is parsed. If the userconfig option is set in the cli or env, then that will be used instead.
    • Global Configs: The file found at ../etc/npmrc (from the node executable, by default this resolves to /usr/local/etc/npmrc) will be parsed if it is found. If the globalconfig option is set in the cli, env, or user config, then that file is parsed instead.
    • Defaults: npm's default configuration options are defined in lib/utils/config-defs.js. These must not be changed.

    See CONTRIBUTIONS

    Patches welcome!

    If you would like to contribute, but don't know what to work on, read the contributing guidelines and check the issues list.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文