mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
chore(build): remember cached files on watch
This commit is contained in:
@ -9,6 +9,7 @@ var runSequence = require('run-sequence');
|
|||||||
var watch = require('gulp-watch');
|
var watch = require('gulp-watch');
|
||||||
var tsc = require('gulp-typescript');
|
var tsc = require('gulp-typescript');
|
||||||
var cache = require('gulp-cached');
|
var cache = require('gulp-cached');
|
||||||
|
var remember = require('gulp-remember');
|
||||||
var minimist = require('minimist');
|
var minimist = require('minimist');
|
||||||
var connect = require('gulp-connect');
|
var connect = require('gulp-connect');
|
||||||
|
|
||||||
@ -113,7 +114,8 @@ gulp.task('watch', function(done) {
|
|||||||
var filePath = basePath + 'dist/' + relativePath;
|
var filePath = basePath + 'dist/' + relativePath;
|
||||||
var typingPath = filePath.replace('.js', '.d.ts');
|
var typingPath = filePath.replace('.js', '.d.ts');
|
||||||
|
|
||||||
delete cache.caches.transpile[file.history[0]];
|
delete cache.caches['no-typecheck'][file.history[0]];
|
||||||
|
remember.forget('no-typecheck', file.history[0]);
|
||||||
|
|
||||||
del([filePath, typingPath], function(){
|
del([filePath, typingPath], function(){
|
||||||
gulp.start('bundle');
|
gulp.start('bundle');
|
||||||
@ -170,8 +172,9 @@ gulp.task('bundle.system', function(){
|
|||||||
var babel = require('gulp-babel');
|
var babel = require('gulp-babel');
|
||||||
var concat = require('gulp-concat');
|
var concat = require('gulp-concat');
|
||||||
|
|
||||||
return tsCompile(tscOptionsEs6, 'babel')
|
return tsCompile(tscOptionsEs6, 'system')
|
||||||
.pipe(babel(babelOptions))
|
.pipe(babel(babelOptions))
|
||||||
|
.pipe(remember('system'))
|
||||||
.pipe(concat('ionic.system.js'))
|
.pipe(concat('ionic.system.js'))
|
||||||
.pipe(gulp.dest('dist/bundles'))
|
.pipe(gulp.dest('dist/bundles'))
|
||||||
})
|
})
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
"gulp-if": "^1.2.5",
|
"gulp-if": "^1.2.5",
|
||||||
"gulp-insert": "^0.5.0",
|
"gulp-insert": "^0.5.0",
|
||||||
"gulp-minify-css": "^1.2.2",
|
"gulp-minify-css": "^1.2.2",
|
||||||
|
"gulp-remember": "^0.3.0",
|
||||||
"gulp-rename": "~1.2.0",
|
"gulp-rename": "~1.2.0",
|
||||||
"gulp-sass": "^2.0.4",
|
"gulp-sass": "^2.0.4",
|
||||||
"gulp-shell": "^0.4.0",
|
"gulp-shell": "^0.4.0",
|
||||||
|
Reference in New Issue
Block a user