> For the complete documentation index, see [llms.txt](https://sherwinshen.gitbook.io/qian-duan-xue-xi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sherwinshen.gitbook.io/qian-duan-xue-xi/tools/npm.md).

# 包管理工具-NPM

## NPM 包发布

参考教程：

1. [《npm发布包教程（一）：从npm说起》](https://segmentfault.com/a/1190000017461666)
2. [《npm发布包教程（二）：发布包》](https://segmentfault.com/a/1190000017463371)
3. [《npm发布包教程（三）：安装发布包》](https://segmentfault.com/a/1190000017472970)
4. [《npm发布包教程（四）：迭代》](https://segmentfault.com/a/1190000017477077)
5. [《npm发布包教程（五）：废弃/删除》](https://segmentfault.com/a/1190000017479985)

除了上传至 npm 来使用包之外，我们还能够借助 github，直接通过github项目安装：npm i git+<https://github.com/MrEnvision/XXX.git>

{% hint style="warning" %}
建议 github 项目使用 tag 来进行版本号管理，安装的时候加上版本号，npm i git+<https://github.com/MrEnvision/XXX.git#版本号>
{% endhint %}

{% hint style="info" %}
如果你对内容有任何疑问，欢迎提交 [❕issues](https://github.com/MrEnvision/Front-end_learning_notes/issues) 或 [✉️ email](mailto:EnvisionShen@gmail.com)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sherwinshen.gitbook.io/qian-duan-xue-xi/tools/npm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
