mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
fix transpile task caching
This commit is contained in:
@ -117,13 +117,13 @@ gulp.task('clean', function(done) {
|
|||||||
del(['dist/**', '!dist'], done);
|
del(['dist/**', '!dist'], done);
|
||||||
});
|
});
|
||||||
|
|
||||||
function tsResult(options){
|
function tsResult(options, cacheName){
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'ionic/**/*.ts',
|
'ionic/**/*.ts',
|
||||||
'!ionic/components/*/test/**/*',
|
'!ionic/components/*/test/**/*',
|
||||||
'!ionic/util/test/*'
|
'!ionic/util/test/*'
|
||||||
])
|
])
|
||||||
.pipe(cache('transpile', { optimizeMemory: true }))
|
.pipe(cache(cacheName, { optimizeMemory: true }))
|
||||||
.pipe(tsc(options, undefined, tscReporter))
|
.pipe(tsc(options, undefined, tscReporter))
|
||||||
.on('error', function(error) {
|
.on('error', function(error) {
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
@ -131,14 +131,14 @@ function tsResult(options){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
gulp.task('transpile.no-typecheck', function(){
|
gulp.task('transpile.no-typecheck', function(){
|
||||||
return tsResult(tscOptionsNoTypeCheck)
|
return tsResult(tscOptionsNoTypeCheck, 'no-typecheck')
|
||||||
.pipe(gulp.dest('dist'));
|
.pipe(gulp.dest('dist'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('transpile.typecheck', function(){
|
gulp.task('transpile.typecheck', function(){
|
||||||
var merge = require('merge2');
|
var merge = require('merge2');
|
||||||
|
|
||||||
var result = tsResult(tscOptions);
|
var result = tsResult(tscOptions, 'typecheck');
|
||||||
|
|
||||||
// merge definition and source streams
|
// merge definition and source streams
|
||||||
return merge([
|
return merge([
|
||||||
|
Reference in New Issue
Block a user