2.1.0 • Published 3 years ago
dimmable-loader v2.1.0
Install
npm install
npm run buildPublish
npm publishUsage
# replace 1.0.3 with the real version number
npm install @zontal/dimmable-loader@1.0.3Multiple registries
It is likely to fetch project dependencies from both public and private repositories in real life.
Somehow npm is not intelligent enough like other package management tools, and the following .npmrc is a way to download package based on scope.
# add those to your local .npmrc(root, user or project level)
registry=https://npm.taobao.org/dist
@zontal:registry=https://zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/
//zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/:always-auth=true
//zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/:_authToken=${CODEARTIFACT_AUTH_TOKEN}- registry: the main place for downloading
- @zontal:registry: download from the target registry if the package
scopeis zontal - //xxx: // doesn't represent comment. this line is not commentable.
Check the registry configuration via
npm config listCodeArtifacts Login
- Option I: Using aws cli tool
aws codeartifact login --tool npm --repository npm --domain zontal-development --domain-owner 521310437492 --region eu-central-1 Option II: Manual setup
# add CODEARTIFACT_AUTH_TOKEN as an environment variable export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain zontal-development --domain-owner 521310437492 --region eu-central-1 --query authorizationToken --output text`# Copy the configuration into your home directory (~/) or project .npmrc file. If the .npmrc file does not exist, create one. registry=https://zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/ //zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/:always-auth=true //zontal-development-521310437492.d.codeartifact.eu-central-1.amazonaws.com/npm/npm/:_authToken=${CODEARTIFACT_AUTH_TOKEN}