Skip to content

Instantly share code, notes, and snippets.

@neekey
Created September 4, 2012 06:29
Show Gist options
  • Save neekey/3617586 to your computer and use it in GitHub Desktop.
Save neekey/3617586 to your computer and use it in GitHub Desktop.
grunt-compass config
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
meta: {
version: '0.1.0',
banner: '/*! PROJECT_NAME - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://www.jvsoftware.com/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'JV Software; Licensed MIT */'
},
lint: {
files: ['grunt.js', '../js/script.js']
},
concat: {
dist: {
src: ['<banner:meta.banner>', '../js/libs/!(modernizr).js', '../js/script.js'],
dest: '../js/script.min.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: '<config:concat.dist.dest>'
}
},
watch: {
files: ['<config:lint.files>', '../sass/*.scss'],
tasks: 'default'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
jquery: true,
devel: true
},
globals: {}
},
uglify: {},
compass: {
dist: {}
}
});
// Default task.
grunt.registerTask('default', 'lint concat min compass');
// Compass tasks
grunt.loadNpmTasks('grunt-compass');
};
/*
This works under the following file structure:
[root]
/js
/libs (3rd party libs)
script.js (custom scripts)
/img
/sass
style.scss
/src
grunt.js (grunt config)
config.rb (compass config)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment