SpartanFX Installation Guide
- Windows
- Other
Step 1: Add .npmrc to your project
Create a file named .npmrc in your project root with:
registry=https://registry.npmjs.org/
@spartanfx:registry=https://pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/registry/
always-auth=true
Step 2: Authenticate
vsts-npm-auth -config .npmrc
info
If you don’t have it installed yet
npm install -g vsts-npm-auth
Step 3: Install the package
npm install @spartanfx/react
Step 1: Add a .npmrc to your project, in the same directory as your package.json
registry=https://registry.npmjs.org/
@spartanfx:registry=https://pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/registry/
always-auth=true
Step 2: Authenticate
Copy the code below to your user .npmrc.
; begin auth token
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/registry/:username=ProgeSwissProducts
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/registry/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/registry/:email=npm requires email to be set but doesn't use the value
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/:username=ProgeSwissProducts
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/:_password=[BASE64_ENCODED_PERSONAL_ACCESS_TOKEN]
//pkgs.dev.azure.com/ProgeSwissProducts/_packaging/SpartanFX/npm/:email=npm requires email to be set but doesn't use the value
; end auth token
Step 3: Personal Access Token
Generate a Personal Access Token with Packaging read & write scopes
Step 4: Encode Personal Access Token
Base64 encode the personal access token from Step 3.
One safe and secure method of Base64 encoding a string is to:
- 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 value and press Enter/Return
- Copy the Base64 encoded value
Step 5: Use Personal Access Token
Replace both [BASE64_ENCODED_PERSONAL_ACCESS_TOKEN] values in your user .npmrc file with your personal access token from Step 4.