0.0.1 • Published 3 years ago

@srnandita/hero-component-library v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

HeroComponentLibrary

This library was generated with Angular CLI version 12.0.3.

Code scaffolding

Run ng generate component component-name --project hero-component-library to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project hero-component-library.

Note: Don't forget to add --project hero-component-library or else it will be added to the default project in your angular.json file.

Build

Run ng build hero-component-library to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build hero-component-library, go to the dist folder cd dist/hero-component-library and run npm publish.

Running unit tests

Run ng test hero-component-library to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Steps

  1. ng new heroapp-part4 --create-application=false --skip-install
  2. cd heroapp-part4
  3. ng g library hero-component-library
  4. ng g module hero-components --project=hero-component-library
  5. ng g c hero-components/header --project=hero-component-library
  6. Inside public-api.ts
    export * from './lib/hero-components/hero-components.module';
    export * from './lib/hero-components/header/header.component';
  7. ng build hero-component-library --prod
  8. Include hero-component in exports of module
  9. To add test application to test the component in the same workspace ng g application hero-app-component-test
  10. Import module hero-components in app.module of test application
0.0.1

3 years ago

1.0.2

3 years ago