@pegakit/pegakit
Version:
The living styleguide, pattern library, UI ToolKit, and front-end build tools that power Pega's digital web properties.
28 lines (20 loc) • 855 B
JavaScript
;
var browserSync = require( 'browser-sync' );
module.exports = function (gulp, config, $) {
gulp.task('patternlab', 'Runs the Pattern Lab PHP commands for generating the Pattern Library & compiling Twig templates.', function(done){
var reportOptions = {
err: false, // default = true, false means don't write err
stderr: false, // default = true, false means don't write stderr
stdout: true // default = true, false means don't write stdout
}
return gulp.src('', {read: false})
.pipe($.plumber({
errorHandler: $.notify.onError({
title: "Pattern Lab Error",
message: "Error: <%= error.message %>"
})
}))
.pipe($.exec('cd pattern-lab && php core/console -gpn'))
.pipe($.exec.reporter(reportOptions));
});
};