2.0.1 • Published 2 years ago
@mrtanguero/library-learning v2.0.1
USAGE
Project setup
- Add a
.npmrc
to your project, in the same directory as your package.json - Copy following lines to to
.npmrc
file:@meas:registry=https://pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/registry/ registry=https://registry.npmjs.org/ always-auth=true
Setup credentials
- Copy the code below to your
.npmrc
:; begin auth token //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/registry/:username=pt-iot //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/registry/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN] //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/registry/:email=npm requires email to be set but doesn't use the value //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/:username=pt-iot //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN] //pkgs.dev.azure.com/pt-iot/_packaging/Artifacts/npm/:email=npm requires email to be set but doesn't use the value ; end auth token
- Generate a Personal Access Token with Packaging read & write scopes.
- GoTo azure-tokens
- Add new token (plus sign)
- Type name, no matter what
- Under section Packaging select read & write.
- Base64 encode the personal access token from previous step:
- From a command/shell prompt run:
node -e "require('readline') .createInterface({input:process.stdin,output:process.stdout,historySize:0}) .question('PAT> ',p => { b64=Buffer.from(p.trim()).toString('base64');console.log(b64);process.exit(); })"
- Paste your personal access token(step 2) value and press Enter/Return
- Copy the Base64 encoded value.
- Replace both
[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
values in your user.npmrc
file with your personal access token from previous step.
Installing package
npm install --save @meas/schema-types