首页 > gulp-tmod插件路径问题?

gulp-tmod插件路径问题?

var gulp = require('gulp'),
    tmodjs = require('gulp-tmod');

gulp.task('test', function(){
    var stream = gulp.src('tpl/**/*.html')
            .pipe(tmodjs({
                templateBase: 'test-all'
            }))
            .pipe(gulp.dest('dist'));
    return stream;
});

gulp.task('default',['test']);


gulp.task('tplzip',function(){
    gulp.watch('tpl/**/*.html',['test']).on('change',function(event){
        console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
        });
});

我的项目tree


官方解释是模版路径:

为什么不能生成在test-all文件夹里,是什么原因呢!~

【热门文章】
【热门文章】