Closed iamstarkov closed 10 years ago
If we need to exec some task exactly after build task (e.g publish to gh-pages), then build task should properly finish itself
Do you talking about run-sequence?
nope.
can we do something like this?
var deps;
gulp.task('deps', function (done) {
var tree = bem.objects(levels).pipe(bem.tree());
deps = tree.deps('pages/index/page');
if (argv.debug) { deps.pipe(debug()); }
done();
});
gulp.task('css', ['deps'], function () {
return deps.src('{bem}.css')
.pipe(concat('index.css'))
.pipe(gulp.dest('./dist'));
});
gulp.task('html', ['deps'], function () {
return deps.src('{bem}.bh.js')
.pipe(bh(require('./pages/index/page/page.bemjson.js'), 'index.html'))
.pipe(gulp.dest('./dist'));
});
gulp.task('build', ['clean', 'html', 'css']);
because after this we can safely create
gulp.task('gh', ['build'], function() {/* buildbranch*/});
Yep, should work.
[01:52:12] Using gulpfile ~/Documents/Яндекс.Диск/projects/gulp-bem-stub/gulpfile.js
[01:52:12] Starting 'clean'...
[01:52:12] Starting 'deps'...
[01:52:12] Finished 'deps' after 18 ms
[01:52:12] Starting 'html'...
[01:52:12] Starting 'css'...
[01:52:12] Finished 'clean' after 44 ms
[01:52:12] Finished 'html' after 66 ms
[01:52:12] Finished 'css' after 75 ms
[01:52:12] Starting 'build'...
[01:52:12] Finished 'build' after 8.11 μs
tasks for css
and html
running asynchronous and it's awesome
Could you clarify this issue a little?