Description
It would be great to be able to use Pattern Lab Node as a dependency in another project (like a CMS theme build for a client - my use case). I would like my repo to contain the source code for the Pattern Lab Patterns, Data, Config, and Header/Footer template files, but not the compiled source – kinda like how we commit our *.scss
but not our *.css
. To do this we'd need to be able to do this at the top of a Gulp file:
var pl = require('patternlab-node')({
"paths": {
"source": {
"root": "./source/",
"patterns": "./source/_patterns/",
"data": "./source/_data/"
}
});
gulp.task('pl', function() {
pl.build();
});
Basically pass in the config object (could just read a config.json
in our repo and pass it in too) and then run the build command.
Is there any interest in the project moving in this direction? I could see the gulp and grunt "starter kits" you already provide getting ported to a yeoman generator for people who want all the stuff out of the box.
Thanks so much for your work and interest in the Pattern Lab world!! 🍻