// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
+ builddir: 'build',
meta: {
banner: '/**\n' +
' * <%= pkg.description %>\n' +
' * @license <%= pkg.license %>' + ' */'
},
swatch: {
- amelia: {}, cerulean:{}, cosmo:{}, cyborg:{}, journal:{}, readable:{},
- shamrock:{}, simplex:{}, slate:{}, spacelab:{}, spruce:{}, superhero:{},
- united:{}
+ amelia:{}, cerulean:{}, cosmo:{}, cyborg:{}, flatly:{}, journal:{}, readable:{},
+ simplex:{}, slate:{}, spacelab:{}, spruce:{}, superhero:{}, united:{}
},
clean: {
- build: {
- src: ['*/build.less', '*/build-responsive.less',
- '!global/build.less', '!global/build-responsive.less']
- }
+ build: {
+ src: ['*/build.less', '*/build-responsive.less',
+ '!global/build.less', '!global/build-responsive.less']
+ }
},
concat: {
dist: {
var dist = {};
concatSrc = 'global/build.less';
concatDest = theme + '/build.less';
- recessDest = theme + '/' + theme + '.css';
+ recessDest = '<%=builddir%>/' + theme + '/bootstrap.css';
recessSrc = [ theme + '/' + 'build.less' ];
dist = {src: concatSrc, dest: concatDest};
grunt.config('recess.dist.options.compress', false);
grunt.task.run(['concat', 'recess:dist', 'clean:build',
- compress ? 'compress:'+recessDest+':'+theme+'/'+theme+'.min.css':'none']);
+ compress ? 'compress:'+recessDest+':'+'<%=builddir%>/' + theme + '/bootstrap.min.css':'none']);
});
grunt.registerTask('build-responsive', 'build a responsive theme', function(theme, compress) {
concatSrc = 'global/build-responsive.less';
concatDest = theme + '/build-responsive.less';
- recessDest = theme + '/' + theme + '-responsive.css';
+ recessDest = '<%=builddir%>/' + theme + '/bootstrap-responsive.css';
recessSrc = [ theme + '/' + 'build-responsive.less' ];
dist = {src: concatSrc, dest: concatDest};
grunt.config('recess.dist.options.compress', false);
grunt.task.run(['concat', 'recess:dist', 'clean:build',
- compress ? 'compress:'+recessDest+':'+theme+'/'+theme+'-responsive.min.css':'none']);
+ compress ? 'compress:'+recessDest+':'+'<%=builddir%>/' + theme + '/bootstrap-responsive.min.css':'none']);
});
grunt.registerTask('compress', 'compress a generic css', function(fileSrc, fileDst) {
var t = this.target;
grunt.task.run('build:'+t, 'build-responsive:'+t);
});
+
+ grunt.registerTask('default', 'build a theme, both not responsive and responsive', function() {
+ grunt.task.run('swatch');
+ });
};
\ No newline at end of file