Created
December 31, 2013 11:44
-
-
Save anonymous/8195657 to your computer and use it in GitHub Desktop.
Browser-sync + Jekyll + Grunt + Sass
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) { | |
// 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