Skip to content

lococo--0/fis3-preprocessor-ng2-inline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

fis3-preprocessor-ng2-inline

此插件会把@Component中的html和style内联进js中。

用法

fis.match('**.ts', {
  parser: fis.plugin('typescript'),
  preprocessor: fis.plugin('ng2-inline'),
  rExt: '.js'
})

效果

cmp.component.ts 预处理前

Component({
  templateUrl: 'xxx',
  styleUrls: ['xxx']
})

处理后

Component({
  template: __inline('xxx'),
  styles: [__inline('xxx')]
})

About

把ng2中htmlUrl和styleUrls的引用内容内联进js文件中

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published