本文整理汇总了TypeScript中gulp-babel类的典型用法代码示例。如果您正苦于以下问题:TypeScript gulp-babel类的具体用法?TypeScript gulp-babel怎么用?TypeScript gulp-babel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了gulp-babel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: tsCompile
task('e2e.bundle', function () {
return tsCompile(getTscOptions('es6'), 'system')
.pipe(babel(babelOptions))
.pipe(remember('system'))
.pipe(concat('ionic.system.js'))
.pipe(dest(`${DIST_NAME}/bundles`))
.pipe(connect.reload());
});
示例2: merge
task('demos.bundle', function () {
var tsResult = tsCompile(getTscOptions('es6'), 'system')
.pipe(babel(babelOptions));
var swiper = src('src/components/slides/swiper-widget.system.js');
return merge([tsResult, swiper])
.pipe(remember('system'))
.pipe(concat('ionic.system.js'))
.pipe(dest(`${DIST_NAME}/bundles`))
.pipe(connect.reload());
});
示例3: function
task('babel', ['concat-develop'], function () {
return gulp.src(bundlePath)
.pipe(babel({
presets: ['es2015'],
plugins: [
'transform-decorators-legacy',
'transform-class-properties',
'transform-decorators',
'transform-object-rest-spread'
]
}))
.pipe(gulp.dest(tmpJsPath));
});
示例4: function
task('babel', ['concat-develop'], function () {
return gulp.src(bundlePath)
.pipe(babel({
presets: ['es2015'],
plugins: [
'transform-decorators-legacy',
'transform-class-properties',
'transform-decorators',
'transform-object-rest-spread',
'transform-async-to-generator'
]
}))
.pipe(gulp.dest(tmpJsPath))
.on('end', () => {
writeFileSync(bundlePath, `(function () {${readFileSync(bundlePath, 'utf8')}})()`);
});
});