Created
August 21, 2014 09:04
-
-
Save heldrida/b8fbe325c3546b9d42fc to your computer and use it in GitHub Desktop.
Gruntfile.js: Basic watch configuration, observing html, sass and javascript 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
/*globals module, grunt*/ | |
'use strict'; | |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
options: { | |
livereload: true | |
}, | |
html: { | |
files: ['*.html'] | |
}, | |
sass: { | |
files: ['sass/main.scss'], | |
tasks: ['sass'] | |
}, | |
scripts: { | |
files: ['js/main.js'] | |
} | |
}, | |
sass: { | |
dist: { | |
files: [{ | |
expand: true, | |
cwd: 'sass', // src is relative to this path | |
src: ['*.scss'], | |
dest: 'css', // destination path | |
ext: '.css' | |
}] | |
} | |
} | |
}); | |
// Load the plugin | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
// Default task(s) | |
grunt.registerTask('default', ['watch']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment