Skip to content

Instantly share code, notes, and snippets.

@tucq88
Forked from anonymous/Gruntfile.js
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tucq88/c2051f10d82e142ce574 to your computer and use it in GitHub Desktop.
Save tucq88/c2051f10d82e142ce574 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
// All configuration goes here
grunt.initConfig({
jekyll: {
build : {
dest: '_site'
}
},
sass: {
dist: {
files: {
'css/app.css': 'scss/app.scss'
}
}
},
watch: {
sass: {
files: 'scss/**/*.scss',
tasks: ['sass']
},
jekyll: {
files: ['_layouts/*.html', '_includes/*.md', 'css/app.css'],
tasks: ['jekyll']
}
},
browser_sync: {
files: {
src : ['_site/css/*.css']
},
options: {
watchTask: true,
ghostMode: {
clicks: true,
scroll: true,
links: true,
forms: true
},
server: {
baseDir: '_site'
}
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-browser-sync');
// Custom tasks
grunt.registerTask('build', ['sass', 'jekyll']);
grunt.registerTask('default', ['build', 'browser_sync', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment