Skip to content

Instantly share code, notes, and snippets.

@JamesVanWaza
Created June 16, 2016 14:38
Show Gist options
  • Save JamesVanWaza/3d5e75f8a7c8bd1c9d6cca9b408182c7 to your computer and use it in GitHub Desktop.
Save JamesVanWaza/3d5e75f8a7c8bd1c9d6cca9b408182c7 to your computer and use it in GitHub Desktop.
/*jslint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
loadPath: ['bower_components/foundation-sites/scss'],
outputStyle: 'expanded',
sourceMap: false
},
files: {
'style.css': 'scss/style.scss'
}
}
}, // sass
watch: {
options: {
livereload: true,
dateFormat: function(time) {
grunt.log.writeln('The watch finished in ' + time + 'ms at ' + (new Date()).toString());
grunt.log.writeln('Waiting for more changes...');
} //date format function
}, //options
scripts: {
files: ['*.js', 'js/*.js']
}, // scripts
//Live Reload of SASS
sass: {
files: 'scss/**/*.scss',
tasks: ['sass']
}, //sass
css: {
files: ['scss/*.scss'],
tasks: []
},
html: {
files: ['*.html']
}, //html
all: {
files: '{,**/}*.js',
tasks: ['jshint']
} //all
}, //watch
postcss: {
options: {
processors: [
require('autoprefixer')({
browsers: 'last 2 versions'
})
]
}
}, //post css
jshint: {
options: {
reporter: require('jshint-stylish')
},
target: ['*.js', 'js/*.js'],
all: ['*.js', 'js/*.js']
} //jshint
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['sass', 'openport:watch.options.livereload:35729', 'watch', 'force:jshint', 'autoupdate']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment