-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME1
72 lines (51 loc) · 1.29 KB
/
README1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# get-package-downloads
## Installation
To install this library, run:
```bash
$ npm install get-package-downloads --save
```
## Consuming your library
Once you have published your library to npm, you can import your library in any Angular application by running:
```bash
$ npm install get-package-downloads
```
and then from your Angular `AppModule`:
```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { SampleModule } from 'get-package-downloads';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
LibraryModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```
Once your library is imported, you can use its components, directives and pipes in your Angular application:
```xml
<!-- You can now use your library component in app.component.html -->
<h1>
{{title}}
</h1>
<sampleComponent></sampleComponent>
```
## Development
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:
```bash
$ npm run build
```
To lint all `*.ts` files:
```bash
$ npm run lint
```
## License
MIT © [Dimitrios Greasidis](mailto:temeteron94@gmail.com)