Created
January 11, 2015 21:41
-
-
Save bradfrost/0b8a5d082bde9fae5663 to your computer and use it in GitHub Desktop.
Jekyll Grunt Cluster
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
module.exports = function(grunt) { | |
// Configuration | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { | |
dist: { | |
options: { | |
style: 'compressed' | |
}, | |
files: { | |
'css/style.css': '_sass/_style.scss' | |
} | |
} | |
}, | |
autoprefixer: { | |
single_file: { | |
src: 'css/style.css', | |
dest: 'css/style.css' | |
} | |
}, | |
shell: { | |
jekyllServe: { | |
command: "jekyll serve --baseurl=" | |
}, | |
jekyllBuild: { | |
command: "jekyll build --config _config.yml" | |
} | |
}, | |
watch: { | |
css: { | |
files: ['_sass/*.scss', '_sass/**/*.scss'], | |
tasks: ['sass', 'autoprefixer', 'shell:jekyllBuild'], | |
options: { | |
livereload: { | |
port: 3000 | |
} | |
} | |
} | |
} | |
}); | |
// Plugins | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-autoprefixer'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-shell'); | |
grunt.loadNpmTasks('grunt-serve'); | |
// Tasks | |
grunt.registerTask('serve', ['watch', 'shell:jekyllServe']); | |
grunt.registerTask('default', ['sass', 'watch', 'autoprefixer', 'shell:jekyllBuild']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment