Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using Grunt with Pattern Lab
module.exports = function(grunt) {
// Configuration
pkg: grunt.file.readJSON('package.json'),
shell: {
patternlab: {
command: "php core/builder.php -gp"
watch: {
html: {
files: ['source/_patterns/**/*.mustache', 'source/_patterns/**/*.json', 'source/_data/*.json'],
tasks: ['shell:patternlab'],
options: {
spawn: false
// Plugins
// Tasks
grunt.registerTask('default', ['watch', 'shell:patternlab']);

This comment has been minimized.

Copy link
Owner Author

bradfrost commented Mar 29, 2014

This is more or less the Gruntfile.js configuration for using Pattern Lab with Grunt.

In order to use Pattern Lab with Grunt, you need to install the Grunt Shell plugin, then set up a task for Pattern Lab to build every time a change is made to a .mustache or .json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.