UNPKG

1.21 kBMarkdownView Raw
1# packaged @tsdi/annotations
2
3This repo is for distribution on `npm`. The source for this module is in the
4[main repo](https://github.com/zhouhoujun/tsioc).
5Please file issues and pull requests against that repo.
6
7typescript class annotations is a solution for typescript class compile to es5 uglify. for project used tsioc to es5 uglify.
8
9## Install
10
11You can install this package either with `npm`.
12
13### npm
14
15```shell
16
17npm install @tsdi/annotations --save-dev
18
19```
20
21## Demo
22
23```ts
24import { classAnnotations } '@tsdi/annotations';
25const ts = require('gulp-typescript');
26gulp.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})
44export class AnnoBuilder {
45}
46
47
48```
49
50```shell
51pk build [taskfile.ts]
52```
53
54https://github.com/zhouhoujun/tsioc.git
55
56## Documentation
57
58Documentation is available on the
59[@tsdi/annotations docs site](https://github.com/zhouhoujun/tsioc).
60
61## License
62
63MIT © [Houjun](https://github.com/zhouhoujun/)
\No newline at end of file