本文整理匯總了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')}})()`);
});
});