How to install a npm package from the GitHub repository All In One
git repo
$ git+https://github.com/xgqfrms/wcui.git
$ git+ssh://[email protected]/xgqfrms/wcui.git
$ npm install https://github.com/xgqfrms/wcui/tree/v1.1.2
$ npm install [email protected]: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
#
标签:npm,GitHub,repository,github,https,xgqfrms,wcui,com
From: https://www.cnblogs.com/xgqfrms/p/17664215.html