UNPKG

1.28 kBMarkdownView Raw
1# @mello-labs/api-tools
2
3## Installation (NPM not configured yet for this module)
4
5To install this library, run:
6
7```bash
8$ npm install @mello-labs/api-tools --save
9```
10
11## Consuming your library
12
13Once you have published your library to npm, you can import your library in any Angular application by running:
14
15```bash
16$ npm install @mello-labs/api-tools
17```
18
19and then from your Angular `AppModule`:
20
21```typescript
22import { BrowserModule } from '@angular/platform-browser';
23import { NgModule } from '@angular/core';
24
25import { AppComponent } from './app.component';
26
27// Import your library
28import { SampleModule } from '@mello-labs/api-tools';
29
30@NgModule({
31 declarations: [
32 AppComponent
33 ],
34 imports: [
35 BrowserModule,
36
37 // Specify your library as an import
38 LibraryModule
39 ],
40 providers: [],
41 bootstrap: [AppComponent]
42})
43export class AppModule { }
44```
45
46Once your library is imported, you can use its components, directives and pipes in your Angular application:
47
48```xml
49<!-- You can now use your library component in app.component.html -->
50<h1>
51 {{title}}
52</h1>
53<sampleComponent></sampleComponent>
54```
55
56## Development
57
58To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:
59
60```bash
61$ npm run build
62```
63
64To lint all `*.ts` files:
65
66```bash
67$ npm run lint
68```
\No newline at end of file