How to install a npm package from the GitHub repository All In One
How to install a npm package from the GitHub repository All In One
git repo
$ git+https://github.com/xgqfrms/wcui.git
$ git+ssh://git@github.com/xgqfrms/wcui.git
$ npm install https://github.com/xgqfrms/wcui/tree/v1.1.2
$ npm install git@github.com:xgqfrms/wcui.git
github
# GitHub URI
$ npm i github:username/repo
$ npm i github:username/repo#branch
$ npm i github:username/repo#tag
$ npm i github:xgqfrms/wcui#main
$ npm install 'xgqfrms/wcui#main'
$ npm install 'xgqfrms/wcui#v1.1.2'
https://github.com/xgqfrms/wcui/tree/main
https://github.com/xgqfrms/wcui/tree/v1.1.2
npm
https://github.com/xgqfrms/wcui/pkgs/npm/wcui
solutions
npm script hooks
Life Cycle Scripts
{
"scripts": {
"preinstall": "call the install script"
}
}
{
"scripts": {
"prepack": "call the build script"
}
}
https://docs.npmjs.com/cli/v9/commands/npm-install
https://docs.npmjs.com/cli/v9/using-npm/scripts
demos
$ npm i github:xgqfrms/wcui#main
# 💩 loading...
$ npm i github:pixelass/probot#feat/esm-it-plz
https://github.com/pixelass/probot/tree/feat/esm-it-plz
refs
https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly
©xgqfrms 2012-2025
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17664215.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
2022-08-29 产品文档 & 技术文档书写教程 All In One
2022-08-29 SwiftUI 4 All In One
2020-08-29 Docker in Action
2020-08-29 How to enable a local HTTPS website in macOS
2020-08-29 美元街
2020-08-29 Node.js & ES Modules & Jest
2019-08-29 Observer & MutationObserver & IntersectionObserver & Proxy & Object.defineProperty()