Skip to content

Instantly share code, notes, and snippets.

@mrmartineau
Last active December 18, 2015 05:39
Show Gist options
  • Save mrmartineau/5734805 to your computer and use it in GitHub Desktop.
Save mrmartineau/5734805 to your computer and use it in GitHub Desktop.
Grunt watch task for compiling scss, js and trigerring a livereload
livereload: {
options: { livereload: true },
files: [
// When these files are changed, livereload is triggered
// Make sure this directory is the same as the one your site points to
'resources/css/styles.css'
]
}
watch: {
scss: {
options: {
nospawn: true,
interrupt: true
},
files: ['resources/scss/**/*.scss'],
tasks: ['sass:dev']
},
js: {
options: {
nospawn: true,
interrupt: true
},
files: [
'resources/js/*.js',
'resources/js/libs/**/*.js'
],
tasks: ['uglify']
},
livereload: {
options: { livereload: true },
files: [
'resources/css/*.css'
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment