Closed secretfader closed 8 years ago
I hacked this together using a callback that is fired when the event build
fires, but it would be nice to have a Promise or callback that could only resolve/fire once when the build is done.
gulp.task('build:pages', (done) => {
acetate({
config: 'config/acetate.js'
}).on('build', () => {
done();
});
});
@nicholaswyoung This should be fixed in 0.4.0 https://github.com/patrickarlt/acetate/releases/tag/v0.4.0. You should be able to do this:
gulp.task('build:pages', (done) => {
acetate({
config: 'config/acetate.js'
}, (errors, warnings, status) => {
done();
});
});
@patrickarlt So 0.4.0 shouldn't require the manual callback, like the one I wrote above?
@nicholaswyoung You still need a callback. Like what I wrote above. https://github.com/gulpjs/gulp/blob/master/docs/API.md#async-task-support
See https://github.com/nicholaswyoung/web/blob/master/gulpfile.js#L30-L36. Since acetate doesn't return a standard callback, Promise, or stream API, I had to do this in order to handle the async task of building.
Would you be open to a PR that would convert the current API into something more standard? Because as it is, it's hard for other tools to know when the build is finished.