This project was generated with Angular CLI version 15.2.2.
Run 'ng build @mybingli/{package_name} --watch' to serve the package localy and hot reload. For example -- ng build @mybingli/forms --watch Multiple packages can be watched at the same time.
Run 'npm link' to link the lib-playground project with the new watchable links. This will ensure the playground also hot reload when updates are done to a package.
Run ng serve
to load the lib-playground project to test out the new updates to a library. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Check the authentication steps on Azure Devops https://mybingli.visualstudio.com/ChatService/_artifacts/feed/BingliNpm/connect/npm
run vsts-npm-auth -config .npmrc
Run ng generate library @mybingli/{package_name}
. All packages are created with the @mybingli prefix to have a clear indicator that these packages are under own maintenance
Navigate to the angular.json in the root and change the prefix from app
to bingli
. This will change the prefix of all newly component inside the new lib.
Don't forget the .npmrc file to publish to the azure feed instead of the public NPM repo.
Run ng generate component {component_name} --project @mybingli/{package_name}
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Be sure you also export the component in the module.ts file and declare it in the publi-api.ts file.
!! Update the version number in the package.json to the desired version number
Run ng build @mybingli/{package_name}
to build the project. The build artifacts will be stored in the dist/
directory.
Navigate to the dist folder in the terminal
You can double check the package.json to make sure all dependencies are update and version number. If not correct you need to build again.
!! Check if the .npmrc file is present in the dist folder. Otherwise copy from project to dist //TODO add .npmrc to ng-package.json to bundle
Run npm publish
If this should fail check the Authentication step