Skip to content

Instantly share code, notes, and snippets.

@allmarkedup
Created April 6, 2016 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allmarkedup/e0cd2df5209c3ba7296a7e08fc936228 to your computer and use it in GitHub Desktop.
Save allmarkedup/e0cd2df5209c3ba7296a7e08fc936228 to your computer and use it in GitHub Desktop.
Run gulp tasks from within the Fractal interactive CLI interface
'use strict';
const fractal = require('@frctl/fractal');
const gulp = require('./gulpfile');
fractal.command('gulp [task]', function(args, done){
const task = args.task || 'default';
this.console.notice(`Running gulp '${task}' task...`);
gulp.start(task, err => {
if (err) {
this.console.error(`There was a problem with the Gulp '${task}' task.`);
this.console.log(err);
} else {
this.console.success(`Gulp '${task}' task has run.`);
}
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment