Skip to content

Instantly share code, notes, and snippets.

@isGabe
Last active December 21, 2015 13:39
Show Gist options
  • Save isGabe/6314241 to your computer and use it in GitHub Desktop.
Save isGabe/6314241 to your computer and use it in GitHub Desktop.
basic grunt files for Compass, SASS, and concatenating and minifying JS
module.exports = function(grunt) {
grunt.initConfig({
watch: {
css: {
files: '**/*.scss',
tasks: ['compass'],
},
},
compass: { // Task
dist: { // Target
options: { // Target options
sassDir: '[sass-directory]',
cssDir: '[compiled-css-directory]',
imagesDir: '[images-directory (optional)]',
environment: 'development',
outputStyle: 'nested',
relativeAssets: true
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['watch']);
};
{
"name": "",
"version": "0.0.0",
"description": "",
"main": "Gruntfile.js",
"dependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.2"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.2",
"grunt-contrib-compass": "~0.5.0"
},
"author": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment