0.0.2 • Published 7 years ago

gulp-riot-only-compiler-template v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

#项目起因 riot3.0后可以通过extend riot.Tag来生成新的组件,新的构造函数中有get tmpl()来提供新组件所需的模板,但这个模板必须符合riot.tag的一系列规范,额外增加理解成本。 使用gulp-riot-only-compiler-template可以将tag文件转换成符合riot.tag标准的模板

#使用方式

npm install --save-dev gulp-riot-only-compiler-template
var gulp = require('gulp');
var riotTmpl = require('gulp-riot-only-compiler-template');
gulp.task('riotTmpl', function(){
    gulp.src('./*.tag')
    .pipe(riotTmpl({
        //opts: opts,
        //extname: 'tag'
    }))
    .pipe(gulp.dest('./output'))
});

#参数说明

  • optsriot.compiler所需参数
  • extname为转换后文件的扩展名