mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
gulpy
This commit is contained in:
13
gulpfile.js
13
gulpfile.js
@ -47,10 +47,13 @@ gulp.task('watch', function() {
|
|||||||
var dest = file.path.replace(__dirname, '../angular-ionic/modules');
|
var dest = file.path.replace(__dirname, '../angular-ionic/modules');
|
||||||
dest = dest.replace(filename, '')
|
dest = dest.replace(filename, '')
|
||||||
|
|
||||||
|
doubleCheckDistFiles();
|
||||||
|
|
||||||
return gulp.src(file.path).pipe(gulp.dest(dest));
|
return gulp.src(file.path).pipe(gulp.dest(dest));
|
||||||
});
|
});
|
||||||
|
|
||||||
watch('ionic/components/*/test/**/*', function() {
|
watch('ionic/components/*/test/**/*', function() {
|
||||||
|
doubleCheckDistFiles();
|
||||||
gulp.start('ionic.examples');
|
gulp.start('ionic.examples');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -61,6 +64,16 @@ gulp.task('watch', function() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function doubleCheckDistFiles() {
|
||||||
|
if (!fs.existsSync('../angular-ionic/dist/js/dev/es5/css')) {
|
||||||
|
gulp.start('sass');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fs.existsSync('../angular-ionic/dist/js/dev/es5/fonts')) {
|
||||||
|
gulp.start('fonts');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gulp.task('clean', function(done) {
|
gulp.task('clean', function(done) {
|
||||||
del(['../angular-ionic/modules/ionic, ./angular-ionic/modules/examples/src/ionic'], done);
|
del(['../angular-ionic/modules/ionic, ./angular-ionic/modules/examples/src/ionic'], done);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user