1 module.exports = function (grunt) {
2 grunt.loadNpmTasks('grunt-recess');
3 grunt.loadNpmTasks('grunt-contrib-concat');
4 grunt.loadNpmTasks('grunt-contrib-clean');
5 // grunt.loadNpmTasks('grunt-contrib-uglify');
7 // Project configuration.
10 pkg: grunt.file.readJSON('package.json'),
13 ' * <%= pkg.description %>\n' +
14 ' * @version v<%= pkg.version %> - ' +
15 '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
16 ' * @link <%= pkg.homepage %>\n' +
17 ' * @license <%= pkg.license %>' + ' */'
20 cerulean:{}, amelia: {}
24 src: ['*/build.less', '*/build-responsive.less',
25 '!global/build.less', '!global/build-responsive.less']
30 src: ['global/build.less'],
44 src: ['<banner:meta.banner>', '<config:concat.build.dest>'],
45 dest: '<%= builddir %>/<%= pkg.name %>.min.js'
50 grunt.registerMultiTask('build', 'build a theme', function() {
51 var theme = this.target;
52 grunt.log.writeln('building theme ' + this.target);
54 var concatDest = theme + '/build.less';
56 var recessDest = theme + '/' + theme + '.css';
57 var recessSrc = [ theme + '/' + 'build.less' ];
59 grunt.config('concat.dist.dest', concatDest);
60 var files = {}; files[recessDest] = recessSrc;
61 grunt.config('recess.dist.files', files);
63 grunt.task.run(['concat', 'recess:dist', 'clean:build']);