Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gruntfile.js: Basic watch configuration, observing html, sass and javascript files
/*globals module, grunt*/
'use strict';
module.exports = function (grunt) {
// Project configuration.
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
// 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