mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
typescript build syntax errors
This commit is contained in:
39
gulpfile.js
39
gulpfile.js
@ -136,26 +136,31 @@ var tscOptions = {
|
|||||||
noEmitOnError: false, // ignore errors
|
noEmitOnError: false, // ignore errors
|
||||||
rootDir: '.'
|
rootDir: '.'
|
||||||
}
|
}
|
||||||
|
var tscReporter = {
|
||||||
|
error: function (error) {
|
||||||
|
console.error(error.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
gulp.task('transpile', function() {
|
gulp.task('transpile', function() {
|
||||||
var stream = gulp.src(['ionic/**/*.ts', 'ionic/**/*.js', '!ionic/components/*/test/**/*', '!ionic/init.js'])
|
var stream = gulp.src(['ionic/**/*.ts', 'ionic/**/*.js', '!ionic/components/*/test/**/*', '!ionic/init.js'])
|
||||||
.pipe(cache('transpile', { optimizeMemory: true }))
|
.pipe(cache('transpile', { optimizeMemory: true }))
|
||||||
.pipe(tsc(tscOptions, null, tsc.reporter.nullReporter()))
|
.pipe(tsc(tscOptions, null, tscReporter))
|
||||||
// .on('error', function(error) {
|
// .on('error', function(error) {
|
||||||
// stream.emit('error', error);
|
// stream.emit('error', error);
|
||||||
// })
|
// })
|
||||||
// .pipe(traceur(traceurOptions))
|
// .pipe(traceur(traceurOptions))
|
||||||
// .on('error', function (err) {
|
// .on('error', function (err) {
|
||||||
// console.log("ERROR: " + err.message);
|
// console.log("ERROR: " + err.message);
|
||||||
// this.emit('end');
|
// this.emit('end');
|
||||||
// })
|
// })
|
||||||
.pipe(gulp.dest('dist/js/es6/ionic'))
|
.pipe(gulp.dest('dist/js/es6/ionic'))
|
||||||
.pipe(babel(babelOptions))
|
.pipe(babel(babelOptions))
|
||||||
.on('error', function (err) {
|
.on('error', function (err) {
|
||||||
console.log("ERROR: " + err.message);
|
console.log("ERROR: " + err.message);
|
||||||
this.emit('end');
|
this.emit('end');
|
||||||
})
|
})
|
||||||
.pipe(gulp.dest('dist/js/es5/ionic'))
|
.pipe(gulp.dest('dist/js/es5/ionic'))
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user