Bootstrap 3.3.5 Update (and other dependencies)

This commit is contained in:
David Miller
2015-06-22 13:25:30 -04:00
parent c1fc29bfe4
commit 0b77a7484f
88 changed files with 1670 additions and 935 deletions

View File

@@ -1,28 +1,27 @@
/*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/* global btoa: true */
'use strict';
var fs = require('fs');
var btoa = require('btoa');
var glob = require('glob');
function getFiles(type) {
var files = {};
var recursive = (type === 'less');
var globExpr = (recursive ? '/**/*' : '/*');
var recursive = type === 'less';
var globExpr = recursive ? '/**/*' : '/*';
glob.sync(type + globExpr)
.filter(function (path) {
return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
})
.forEach(function (fullPath) {
var relativePath = fullPath.replace(/^[^/]+\//, '');
files[relativePath] = (type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'));
files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8');
});
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
}
@@ -38,8 +37,7 @@ module.exports = function generateRawFilesJs(grunt, banner) {
var rawFilesJs = 'docs/assets/js/raw-files.min.js';
try {
fs.writeFileSync(rawFilesJs, files);
}
catch (err) {
} catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');