Skip to content

Instantly share code, notes, and snippets.

@armandduijn
Last active November 6, 2015 11:26
Show Gist options
  • Save armandduijn/f62c03794d4425931379 to your computer and use it in GitHub Desktop.
Save armandduijn/f62c03794d4425931379 to your computer and use it in GitHub Desktop.
Grunt file to compile SASS on the fly
module.exports = function(grunt) {
grunt.initConfig({
// Project configuration
pkg: grunt.file.readJSON('package.json'),
// Compile Sass
sass: {
options: {
sourceMap: true,
sourceComments: false
},
dist: {
files: {
'css/file.css': 'sass/file.scss'
}
}
},
// Watch and build
watch: {
sass: {
files: 'public/css/*.scss',
tasks: ['sass']
}
}
});
// Load dependencies
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass');
// Run tasks
grunt.registerTask('default', ['sass']);
};
@armandduijn
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment