better gulp watch

This commit is contained in:
Adam Bradley
2015-06-04 11:51:14 -05:00
parent afbb932481
commit f9086f0ba9
5 changed files with 148 additions and 38 deletions

View File

@ -40,12 +40,17 @@ gulp.task('watch', function() {
'polyfills',
function() {
watch('ionic/**/*.js', function() {
gulp.start('ionic.copy.js');
watch('ionic/**/*.js', function(file) {
var splt = file.path.split('/');
var filename = splt[splt.length - 1];
var dest = file.path.replace(__dirname, '../angular-ionic/modules');
dest = dest.replace(filename, '')
return gulp.src(file.path).pipe(gulp.dest(dest));
});
watch('ionic/components/*/test/**/*', function() {
gulp.start('ionic.copy.js');
gulp.start('ionic.examples');
});