fis-postprocessor-annotate-gmsoft

1.2.6 • Public • Published

fis-postprocessor-annotate

add ng-annotate for angularjs in fis postprocessor

在fis里继承ng-annotate的功能

安装

    npm install -g fis-postprocessor-annotate

然后再fis-conf.js中开始annotate插件(如果基于fisp的,要把fisp的配置也一起拷贝过来)

fis.config.merge({
    modules : {
        postprocessor : {
            js : 'annotate'
        }
    }
})

使用 ng-annotate,默认是add,如果想remove,可以再fis中添加以下配置

fis.config.merge({
    settings : {
        postprocessor : {
            annotate: {
                annotate:'remove'
            }
        }
    },
})

要在roadmap里面配置,在extras里面加上isAnnotate:true,匹配到的文件,才会进行ng-annotate处理,eg:把fisp里的配置加上,配置为widget里面的js,才会进行ng-annotate处理

fis.config.merge({
    roadmap : {
        path:[
          {
            reg:/^\/widget\/(.*\.(js|css))$/i,
            isMod:true,
            release:'/static/${namespace}/widget/$1',
            extras:{
                isAnnotate:true
            }
          }
        ]
    }
})

然后fis release的时候,就会加入ng-annotate的编译,让angular的代码可编译

此插件还用了 semi,在代码之后自动加上分号,也是方便压缩用的

Package Sidebar

Install

npm i fis-postprocessor-annotate-gmsoft

Weekly Downloads

2

Version

1.2.6

License

MIT

Unpacked Size

3.05 kB

Total Files

3

Last publish

Collaborators

  • angular-moon