海通社区优化
1.经过改造,现在支持es6的转译了。使用gulp-typescript
插件将es6文件夹下的js转译为es5,并加上controller后缀,这样项目里就能直接用了
//es6组件编译
gulp.task('es6Compile', () => {
return gulp
.src('./app/js/es6/*.js')
.pipe(
ts({
allowJs: true,
target: 'es5',
removeComments: true,
noImplicitAny: true,
})
)
.pipe(rename({suffix: ".controller"}))
.pipe(gulp.dest('./app/js/controllers'));
});