Commit e21852a6 authored by Francesco Pontillo's avatar Francesco Pontillo
Browse files

Merge branch 'gh-pages' of github.com:frapontillo/bootswatch into gh-pages

parents 79aa1ffc 04c6984b
.idea
components
node_modules
/CNAME
build
branches:
only:
- master
- gh-pages
language: node_js
node_js:
- "0.8.11"
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install -g grunt-cli recess
node_js:
- "0.8.11"
before_install:
- npm install -g grunt-cli recess bower
- bower install bootstrap
script: "grunt build"
\ No newline at end of file
script: "grunt swatch"
\ No newline at end of file
bootswatch.com
\ No newline at end of file
......@@ -2,12 +2,11 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-clean');
// grunt.loadNpmTasks('grunt-contrib-uglify');
// Project configuration.
grunt.initConfig({
builddir: 'build',
pkg: grunt.file.readJSON('package.json'),
builddir: 'build',
meta: {
banner: '/**\n' +
' * <%= pkg.description %>\n' +
......@@ -16,7 +15,7 @@ module.exports = function (grunt) {
' * @link <%= pkg.homepage %>\n' +
' * @license <%= pkg.license %>' + ' */'
},
build: {
swatch: {
amelia: {}, cerulean:{}, cosmo:{}, cyborg:{}, journal:{}, readable:{},
shamrock:{}, simplex:{}, slate:{}, spacelab:{}, spruce:{}, superhero:{},
united:{}
......@@ -29,39 +28,83 @@ module.exports = function (grunt) {
},
concat: {
dist: {
src: ['global/build.less'],
src: [],
dest: ''
}
},
recess: {
dist: {
options: {
compile: true
compile: true,
compress: false
},
files: {}
}
},
min: {
build: {
src: ['<banner:meta.banner>', '<config:concat.build.dest>'],
dest: '<%= builddir %>/<%= pkg.name %>.min.js'
}
}
});
grunt.registerMultiTask('build', 'build a theme', function() {
var theme = this.target;
grunt.log.writeln('building theme ' + this.target);
grunt.registerTask('none', function() {});
var concatDest = theme + '/build.less';
grunt.registerTask('build', 'build a regular theme', function(theme, compress) {
var compress = compress == undefined ? true : compress;
var recessDest = theme + '/' + theme + '.css';
var recessSrc = [ theme + '/' + 'build.less' ];
var concatSrc;
var concatDest;
var recessDest;
var recessSrc;
var files = {};
var dist = {};
concatSrc = 'global/build.less';
concatDest = theme + '/build.less';
recessDest = '<%=builddir%>/' + theme + '/bootstrap.css';
recessSrc = [ theme + '/' + 'build.less' ];
grunt.config('concat.dist.dest', concatDest);
var files = {}; files[recessDest] = recessSrc;
dist = {src: concatSrc, dest: concatDest};
grunt.config('concat.dist', dist);
files = {}; files[recessDest] = recessSrc;
grunt.config('recess.dist.files', files);
grunt.config('recess.dist.options.compress', false);
grunt.task.run(['concat', 'recess:dist', 'clean:build',
compress ? 'compress:'+recessDest+':'+'<%=builddir%>/' + theme + '/bootstrap.min.css':'none']);
});
grunt.registerTask('build-responsive', 'build a responsive theme', function(theme, compress) {
var compress = compress == undefined ? true : compress;
var concatSrc;
var concatDest;
var recessDest;
var recessSrc;
var files = {};
var dist = {};
concatSrc = 'global/build-responsive.less';
concatDest = theme + '/build-responsive.less';
recessDest = '<%=builddir%>/' + theme + '/bootstrap-responsive.css';
recessSrc = [ theme + '/' + 'build-responsive.less' ];
dist = {src: concatSrc, dest: concatDest};
grunt.config('concat.dist', dist);
files = {}; files[recessDest] = recessSrc;
grunt.config('recess.dist.files', files);
grunt.config('recess.dist.options.compress', false);
grunt.task.run(['concat', 'recess:dist', 'clean:build',
compress ? 'compress:'+recessDest+':'+'<%=builddir%>/' + theme + '/bootstrap-responsive.min.css':'none']);
});
grunt.registerTask('compress', 'compress a generic css', function(fileSrc, fileDst) {
var files = {}; files[fileDst] = fileSrc;
grunt.log.writeln('compressing file ' + fileSrc);
grunt.config('recess.dist.files', files);
grunt.config('recess.dist.options.compress', true);
grunt.task.run(['recess:dist']);
});
grunt.task.run(['concat', 'recess:dist', 'clean:build']);
grunt.registerMultiTask('swatch', 'build a theme, both not responsive and responsive', function() {
var t = this.target;
grunt.task.run('build:'+t, 'build-responsive:'+t);
});
};
\ No newline at end of file
This diff is collapsed.
......@@ -13,7 +13,6 @@
"node": ">= 0.8.11"
},
"devDependencies": {
"recess": "~1.1.6",
"grunt": "~0.4.0",
"grunt-recess": "~0.3.1",
"grunt-contrib-concat": "~0.1.3",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment