0.1.7 • Published 2 years ago
santoshgeekslib v0.1.7
Install
npm i santoshgeekslib --save
Usage
Import MyLibModule to your module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MyLibModule} from 'santoshgeekslib'
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
MyLibModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
And add <lib-my-lib></lib-my-lib>
in your component.html
Build
Run ng build my-lib
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build my-lib
, go to the dist folder cd dist/my-lib
and run npm publish
.
Running unit tests
Run ng test my-lib
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.