1 | # packaged @tsdi/annotations
|
2 |
|
3 | This repo is for distribution on `npm`. The source for this module is in the
|
4 | [main repo](https://github.com/zhouhoujun/tsioc).
|
5 | Please file issues and pull requests against that repo.
|
6 |
|
7 | typescript class annotations is a solution for typescript class compile to es5 uglify. for project used tsioc to es5 uglify.
|
8 |
|
9 | ## Install
|
10 |
|
11 | You can install this package either with `npm`.
|
12 |
|
13 | ### npm
|
14 |
|
15 | ```shell
|
16 |
|
17 | npm install @tsdi/annotations --save-dev
|
18 |
|
19 | ```
|
20 |
|
21 | ## Demo
|
22 |
|
23 | ```ts
|
24 | import { classAnnotations } '@tsdi/annotations';
|
25 | const ts = require('gulp-typescript');
|
26 | gulp.src('src/**/*.ts')
|
27 | .pipe(classAnnotations())
|
28 | .pipe(ts)
|
29 |
|
30 | ```
|
31 |
|
32 | ## Demo for pack build
|
33 |
|
34 | ```ts
|
35 | @Pack({
|
36 | baseURL: __dirname,
|
37 | src: 'src',
|
38 | clean: 'lib',
|
39 | test: 'test/**/*.spec.ts',
|
40 | assets: {
|
41 | ts: { dest: 'lib', annotation: true, uglify: false }
|
42 | }
|
43 | })
|
44 | export class AnnoBuilder {
|
45 | }
|
46 |
|
47 |
|
48 | ```
|
49 |
|
50 | ```shell
|
51 | pk build [taskfile.ts]
|
52 | ```
|
53 |
|
54 | https://github.com/zhouhoujun/tsioc.git
|
55 |
|
56 | ## Documentation
|
57 |
|
58 | Documentation is available on the
|
59 | [@tsdi/annotations docs site](https://github.com/zhouhoujun/tsioc).
|
60 |
|
61 | ## License
|
62 |
|
63 | MIT © [Houjun](https://github.com/zhouhoujun/) |
\ | No newline at end of file |