0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Add build-raw-files log; fixes #12603

Fixes #12672
This commit is contained in:
Zlatan Vasović 2014-02-13 08:37:37 +01:00 committed by Chris Rebert
parent 1b4a3dbbec
commit 7100e3a37e

View File

@ -6,8 +6,9 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
'use strict';
var btoa = require('btoa');
var fs = require('fs');
var btoa = require('btoa');
var grunt = require('grunt');
function getFiles(type) {
var files = {};
@ -27,5 +28,12 @@ module.exports = function generateRawFilesJs(banner) {
banner = '';
}
var files = banner + getFiles('js') + getFiles('less') + getFiles('fonts');
fs.writeFileSync('docs/assets/js/raw-files.min.js', files);
var rawFilesJs = 'docs/assets/js/raw-files.min.js';
try {
fs.writeFileSync(rawFilesJs, files);
}
catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');
};