Last active
November 6, 2015 11:26
-
-
Save armandduijn/f62c03794d4425931379 to your computer and use it in GitHub Desktop.
Grunt file to compile SASS on the fly
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) { | |
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']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kokx