Skip to content

Instantly share code, notes, and snippets.

@RCopeland
Created April 7, 2014 14:55
Show Gist options
  • Save RCopeland/10021875 to your computer and use it in GitHub Desktop.
Save RCopeland/10021875 to your computer and use it in GitHub Desktop.
Gruntfile.js for Using Jekyll with Sass and LiveReload
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dist: {
options: {
'require': ['modular-scale','susy'],
'outputStyle': 'compressed',
'sassDir': 'sass',
'cssDir': 'assets/css'
}
}
},
uglify: {
dist: {
files: {
'assets/js/main.min.js': 'js/main.js'
}
}
},
jekyll: {
dist: {
options: {
src: '.',
dest: '_site',
config: '_config.yml',
safe: true
}
}
},
watch: {
markup: {
files: ['index.html','_includes/*.html','_posts/*'],
tasks: ['jekyll'],
options: {
livereload: true
}
},
css: {
files: ['sass/*.sass','sass/**/*.sass'],
tasks: ['compass','jekyll'],
options: {
livereload: true
}
},
js: {
files: ['js/*.js', 'js/**/*.js'],
tasks: ['uglify','jekyll'],
options: {
livereload: true
}
}
}
});
//load npm tasks
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jekyll');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment