Answer the question
In order to leave comments, you need to log in
How to use gulp.spritesmith generated styl file in your project?
There is a project with its own styl files.
There is a task for spritesmith to generate a sprite.
Everything is done in this order
gulp.task('build', ['frontend_sprite', 'frontend_img', 'frontend_css', 'union_css', 'frontend_js']);
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/a/26390567/3881371
You need to tell the task to wait for another task to complete, like so:
gulp.task('frontend_sprite', function(){
// тело функции
});
gulp.task('frontend_img', ['frontend_sprite'], function(){ // будет ждать пока выполнится 'frontend_sprite' перед запуском
// тело функции
});
gulp.task('frontend_css', ['frontend_sprite'], function(){ // будет ждать пока выполнится 'frontend_sprite' перед запуском
// тело функции
});
gulp.task('frontend_css', ['union_css'], function(){ // будет ждать пока выполнится 'union_css' перед запуском
// тело функции
});
gulp.task('frontend_js', function(){
// тело функции
});
gulp.task('build', ['frontend_sprite', 'frontend_img', 'frontend_css', 'union_css', 'frontend_js']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question