1.3.2 • Published 11 months ago
source-components v1.3.2
SourceComponents
This library was generated with Angular CLI version 14.2.0.
Build
Run ng build source-components
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
To publish a new version of the project you need to generate a personal access token on your azure account.
1. Generate access token
- On your azure account access: User settings -> Personal access tokens;
- Click on: New Token;
- Fill in the form;
- Name: the name of your access token;
- Organization: klir;
- Expiration: Set the expiration date that better fits your needs;
- Scope: Full Access;
- Click on create;
- Now make sure to copy and SAVE the code because you won't be able to see this code again;
- Encript this code to a BASE_64 format;
2. Build and publish
- On the project access the file called .npmrc and add the following code:
; begin auth token
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/registry/:username=klir
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/registry/:_password=BASE_64_PASSWD
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/registry/:email=admin@klir.com
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/:username=klir
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/:_password=BASE_64_PASSWD
//pkgs.dev.azure.com/klir/Klir/_packaging/KlirAngularLibraries/npm/:email=admin@klir.com
; end auth token
- Now put your BASE_64 access token on the _password field;
- Remove the .npmrc file from git staging area:
git update-index --assume-unchanged .npmrc
; - Go to the file
package.json
and update the version; - Run:
npm install && ng build source-components
; - Copy and paste the file .npmrc to the dist/source-components folder;
- Go to the dist folder
cd dist/source-components
and runnpm publish
.
Testing your modifications on the consuming project
- After you finish your modifications run
npm run sc:build
to build the project; - Enter the dist folder
cd dist/source-components
; - Run
npm link
;
Now on the consuming project
- Run
npm link source-components
; - Now you can test all of your modifications locally without the need to publish a new version;
Notes:
- To unlink the project just run
npm install
;- If you want to test new modifications you'll need to run the build process again.
Running unit tests
Run npm run sc:test
to execute the unit tests via Karma.
1.3.2
11 months ago