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
(? 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 ?️,侵权必究⚠️!
- repository install package GitHub fromrepository install package github repository install remote fatal repository github star repositories github github fork from install source from code directory packages install oserror create-remix following installed package yum yum-utils install package environmenterror directory packages install