Skip to content

Instantly share code, notes, and snippets.

@neil-s
Created January 3, 2014 23:04
Show Gist options
  • Save neil-s/8248424 to your computer and use it in GitHub Desktop.
Save neil-s/8248424 to your computer and use it in GitHub Desktop.
Gruntfile that has issues with injecting livereload script.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['bower_components/foundation/scss']
},
dist: {
options: {
outputStyle: 'compressed'
},
files: {
'css/app.css': 'scss/app.scss'
}
}
},
watch: {
grunt: { files: ['Gruntfile.js'] },
sass: {
files: 'scss/**/*.scss',
tasks: ['sass']
},
livereload: {
options: {livereload: true},
files: ['css/*.css'],
},
},
connect: {
server: {
options:{
hostname: '*',
port: '80',
open: 'http://localhost',
livereload: true,
},
},
},
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('connect-livereload');
grunt.registerTask('build', ['sass']);
grunt.registerTask('default', ['build','connect','watch']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment