public
Last active

grunt-compass config

  • Download Gist
grunt.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
/*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)
*/

If anyone knows how to exclude modernizr.js from the ../js/libs/*.js regex please let me know

Got it, I'm ignoring modernizr from the concat/min process because it needs to be included by itself before anything else

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.