Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Foundation 5 Gruntfile.js to compile sass with libsass and copy bower components to /js/ in your project. Run `npm install && bower install` and then `grunt` to watch
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'
}
}
},
copy: {
main: {
expand: true,
cwd: 'bower_components',
src: '**',
dest: 'js'
},
},
watch: {
options: {
livereload: true
},
grunt: { files: ['Gruntfile.js'] },
sass: {
files: 'scss/**/*.scss',
tasks: ['sass']
}
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('build', ['sass']);
grunt.registerTask('default', ['copy', 'watch']);
}
{
"name": "foundation-libsass-template",
"version": "0.0.1",
"devDependencies": {
"node-sass": "~0.7.0",
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-sass": "~0.8.0",
"grunt-contrib-copy": "~0.4.1",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.