Created
October 2, 2012 15:58
-
-
Save paulohp/3820389 to your computer and use it in GitHub Desktop.
grunt-compass config
This file contains hidden or 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
/*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