my-bingly-lib

0.0.0 • Public • Published

MyBinglyLib

This project was generated with Angular CLI version 15.2.2.

Development server

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.

Authenticate Azure NPM Feed

Check the authentication steps on Azure Devops https://mybingli.visualstudio.com/ChatService/_artifacts/feed/BingliNpm/connect/npm

run vsts-npm-auth -config .npmrc

Adding Libary

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.

Adding Components to existing library

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.

Publishing a package

!! 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

Readme

Keywords

none

Package Sidebar

Install

npm i my-bingly-lib

Weekly Downloads

1

Version

0.0.0

License

none

Unpacked Size

5.38 MB

Total Files

280

Last publish

Collaborators

  • bschembri