mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(gulpfile): cleanup
This commit is contained in:
34
gulpfile.js
34
gulpfile.js
@ -63,10 +63,6 @@ var babelOptions = {
|
|||||||
|
|
||||||
gulp.task('build', ['bundle.system', 'e2e.build', 'sass', 'fonts']);
|
gulp.task('build', ['bundle.system', 'e2e.build', 'sass', 'fonts']);
|
||||||
|
|
||||||
gulp.task('clean.build', function(done) {
|
|
||||||
runSequence('clean', 'build', done);
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('watch', function(done) {
|
gulp.task('watch', function(done) {
|
||||||
runSequence(
|
runSequence(
|
||||||
'copy.libs',
|
'copy.libs',
|
||||||
@ -100,18 +96,19 @@ gulp.task('watch', function(done) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
function deleteFile(file) {
|
function deleteFile(file) {
|
||||||
var basePath = file.base.substring(0, file.base.lastIndexOf("ionic/"));
|
//TODO
|
||||||
var relativePath = file.history[0].replace(file.base, '').replace('.ts', '.js');
|
// var basePath = file.base.substring(0, file.base.lastIndexOf("ionic/"));
|
||||||
|
// var relativePath = file.history[0].replace(file.base, '').replace('.ts', '.js');
|
||||||
var filePath = basePath + 'dist/' + relativePath;
|
//
|
||||||
var typingPath = filePath.replace('.js', '.d.ts');
|
// var filePath = basePath + 'dist/' + relativePath;
|
||||||
|
// var typingPath = filePath.replace('.js', '.d.ts');
|
||||||
delete cache.caches['no-typecheck'][file.history[0]];
|
//
|
||||||
remember.forget('no-typecheck', file.history[0]);
|
// delete cache.caches['no-typecheck'][file.history[0]];
|
||||||
|
// remember.forget('no-typecheck', file.history[0]);
|
||||||
del([filePath, typingPath], function(){
|
//
|
||||||
gulp.start('bundle.system');
|
// del([filePath, typingPath], function(){
|
||||||
});
|
// gulp.start('bundle.system');
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -458,12 +455,11 @@ gulp.task('package', ['src.release'], function(done){
|
|||||||
var packageJSON = require('./package.json');
|
var packageJSON = require('./package.json');
|
||||||
templateVars.ionicVersion = packageJSON.version;
|
templateVars.ionicVersion = packageJSON.version;
|
||||||
templateVars.angularVersion = packageJSON.dependencies.angular2;
|
templateVars.angularVersion = packageJSON.dependencies.angular2;
|
||||||
var packageTemplate = _.template(fs.readFileSync('scripts/npm/package.json'));
|
var packageTemplate = _.template(fs.readFileSync('scripts/npm/package.json'));
|
||||||
fs.writeFileSync(distDir + '/package.json', packageTemplate(templateVars));
|
fs.writeFileSync(distDir + '/package.json', packageTemplate(templateVars));
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
gulp.task('prepare', function(){
|
gulp.task('prepare', function(){
|
||||||
var execSync = require('child_process').execSync;
|
var execSync = require('child_process').execSync;
|
||||||
var spawnSync = require('child_process').spawnSync;
|
var spawnSync = require('child_process').spawnSync;
|
||||||
@ -634,7 +630,7 @@ gulp.task('demos', ['bundle.demos'], function() {
|
|||||||
return merge([demosStream, cssStream]);
|
return merge([demosStream, cssStream]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('watch:demos', function() {
|
gulp.task('watch.demos', function() {
|
||||||
watch('demos/**/*', function() {
|
watch('demos/**/*', function() {
|
||||||
gulp.start('demos');
|
gulp.start('demos');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user