johnpapa / gulp-patterns

Playground for Gulp Recipes
501 stars 146 forks source link

dependent task is not called #128

Open prashant93 opened 7 years ago

prashant93 commented 7 years ago

when called templatecache clean-code is called but not template cache.

gulp.task('templatecache', ['clean-code'], function () { log('Creating AngularJs templateCache'); return gulp.src(config.htmltemplates) .pipe($.minifyHtml({ empty: true })) .pipe($.angularTemplatecache(config.templateCache.files, config.templateCache.options)) .pipe(gulp.dest(config.temp)); });

image

prashant93 commented 7 years ago

I see callback function is not working, i removed call back and simply return this task and it worked.

function clean(path) { log('Cleaning: ' + $.util.colors.blue(path)); return del(path); } gulp.task('clean-code', function () { var files = [].concat( config.temp + '/*.js', config.build + '*/.html', config.build + 'js//*.js' ); return clean(files); });