Created
January 17, 2014 16:47
-
-
Save jasonvarga/8476768 to your computer and use it in GitHub Desktop.
Getting Grunt to watch Statamic files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
... | |
themePath: '_themes/theme_name', | |
watch: { | |
options: { livereload: true }, | |
css: { | |
files: ['<%= themePath %>/sass/**'], | |
tasks: ['compass'] | |
}, | |
scripts: { | |
files: [ | |
'<%= themePath %>/js/**', | |
'!<%= themePath %>/js/themename.js' | |
], | |
tasks: ['concat', 'uglify'] | |
}, | |
templates: { | |
files: [ | |
'<%= themePath %>/templates/**', | |
'<%= themePath %>/partials/**', | |
'<%= themePath %>/layouts/**' | |
] | |
}, | |
content: { | |
files: ['_content/**'] | |
} | |
} | |
... | |
}); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes Gruntfile.js is in the project root directory.
ie. Same folder as _app, _themes, etc