Home

Awesome

angular-library-template

This template includes the following features:

Table of contents

<!-- toc --> <!-- tocstop -->

Angular compatibility

This libraryAngular
1.x.x16 - 18
<!-- Remove this once ready to publish ## Installation - `npm` ``` npm i -S @babybeet/angular-library-template ``` - `pnpm` ``` pnpm i -S @babybeet/angular-library-template ``` - `yarn` ``` yarn add @babybeet/angular-library-template ``` -->

How to use

Configurations

Development

To develop your library code, just add changes to lib folder.

Be sure to add anything that you'd like to export to public-api.ts file, or else, nothing can be imported from your library.

Testing

Unit testing

Execute pnpm test to run all of your unit tests in watch mode, or pnpm test:ci to run it in non-watch mode.

Visual testing

To visually check your components/directives, you can import them into projects/visual-test app and use the imported symbols as normal. Changes made to your library code will also cause the visual app to auto-reload after running pnpm start at the root of the product directory which will start a regular Angular app on http://localhost:4200.

Building and publishing

Before you publish your library, you should update your README file (Be sure to not change the ## Table of contents section as this is updated automatically by a script that runs on every commit hook) and choose an appropriate software license. Anything added to README.md file will be copied to the final distribution inside dist/your-library-name folder to be published to the npm registry, additionally, the LICENSE file and package.json file inside projects/your-library-name folder will also be copied to distribution folder, so make sure you configure your package.json accordingly.