mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
transpile tests
This commit is contained in:
18
gulpfile.js
18
gulpfile.js
@ -59,7 +59,7 @@ gulp.task('watch', function() {
|
|||||||
'serve',
|
'serve',
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
watch(['ionic/**/*.js', '!ionic/components/*/test/**/*'], function() {
|
watch(['ionic/**/*.js', 'ionic/components/*/test/**/*'], function() {
|
||||||
runSequence(
|
runSequence(
|
||||||
'transpile',
|
'transpile',
|
||||||
'bundle.js',
|
'bundle.js',
|
||||||
@ -108,6 +108,20 @@ var babelOptions = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var exampleBabelOptions = {
|
||||||
|
optional: ['es7.decorators'],
|
||||||
|
/*plugins: [
|
||||||
|
'./transformers/disable-define',
|
||||||
|
'angular2-annotations',
|
||||||
|
'type-assertion:after'
|
||||||
|
],*/
|
||||||
|
modules: "system",
|
||||||
|
moduleIds: true,
|
||||||
|
getModuleId: function(name) {
|
||||||
|
return "dist/examples/" + name.split('/test').join('');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
gulp.task('transpile', function() {
|
gulp.task('transpile', function() {
|
||||||
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*', '!ionic/init.js'])
|
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*', '!ionic/init.js'])
|
||||||
.pipe(cache('transpile', { optimizeMemory: true }))
|
.pipe(cache('transpile', { optimizeMemory: true }))
|
||||||
@ -153,7 +167,7 @@ gulp.task('bundle.js', function() {
|
|||||||
gulp.task('examples', function() {
|
gulp.task('examples', function() {
|
||||||
var buildTest = lazypipe()
|
var buildTest = lazypipe()
|
||||||
.pipe(traceur, traceurOptions)
|
.pipe(traceur, traceurOptions)
|
||||||
//.pipe(babel, babelOptions) Let SystemJS load index.js at runtime, saves build time
|
.pipe(babel, exampleBabelOptions)
|
||||||
|
|
||||||
// Get each test folder with gulp.src
|
// Get each test folder with gulp.src
|
||||||
return gulp.src('ionic/components/*/test/*/**/*')
|
return gulp.src('ionic/components/*/test/*/**/*')
|
||||||
|
Reference in New Issue
Block a user