typescript-class-annotations
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

packaged typescript-class-annotations

This repo is for distribution on npm. The source for this module is in the main repo. Please file issues and pull requests against that repo.

typescript class annotations is a solution for typescript class compile to es5 uglify. for project used tsioc to es5 uglify.

Install

You can install this package either with npm.

npm

 
npm install typescript-class-annotations --save-dev
 

Demo

import { classAnnotations } 'typescript-class-annotations';
const ts = require('gulp-typescript');
gulp.src('src/**/*.ts')
    .pipe(classAnnotations())
    .pipe(ts)
 

Demo for development

Development.create(gulp, __dirname, {
    tasks:[
        <INodeTaskOption>{
            src: 'src',
            dist: 'lib',
            asserts:{
                ts: {
                    //src: '...',
                    //dist:'...',
                    loader: 'development-assert-ts',
                    //also can add pipe works here.
                    tsPipes: [
                        ()=> classAnnotations()
                    ]
                    // or some state use annotation.
                    tsPipes: (ctx) =>{
                        return (ctx.oper &  Operation.deploy?
                        [
                            ()=> classAnnotations()
                        ] : [];
                    }
                }
                ....
 

https://github.com/zhouhoujun/typescript-class-annotations.git

Documentation

Documentation is available on the typescript-class-annotations docs site.

License

MIT © Houjun

Package Sidebar

Install

npm i typescript-class-annotations

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

15.6 kB

Total Files

11

Last publish

Collaborators

  • houjun