From: Jacob Thornton Date: Thu, 8 Aug 2013 06:06:29 +0000 (-0700) Subject: first prototype of new customizer X-Git-Tag: v3.0.0-rc.2~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b35b65d0b3689f7999be998411e632046548af6e;p=thirdparty%2Fbootstrap.git first prototype of new customizer --- diff --git a/Gruntfile.js b/Gruntfile.js index de6db2f3c5..3bf6cdc64c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -34,6 +34,7 @@ module.exports = function(grunt) { src: ['js/tests/unit/*.js'] } }, + concat: { options: { banner: '<%= banner %><%= jqueryCheck %>', @@ -57,6 +58,7 @@ module.exports = function(grunt) { dest: 'dist/js/<%= pkg.name %>.js' } }, + uglify: { options: { banner: '<%= banner %>' @@ -90,6 +92,7 @@ module.exports = function(grunt) { }, files: ['js/tests/*.html'] }, + connect: { server: { options: { @@ -141,4 +144,25 @@ module.exports = function(grunt) { // Default task. grunt.registerTask('default', ['test', 'dist']); + + // task for building customizer + grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () { + var fs = require('fs') + + function getFiles(type) { + var files = {} + fs.readdirSync(type) + .filter(function (path) { + return new RegExp('\\.' + type + '$').test(path) + }) + .forEach(function (path) { + return files[path] = fs.readFileSync(type + '/' + path, 'utf8') + }) + return 'var __' + type + ' = ' + JSON.stringify(files) + '\n' + } + + var customize = fs.readFileSync('customize.html', 'utf-8') + var files = '\n + + + + + \ No newline at end of file