summaryrefslogtreecommitdiffstats
path: root/bower_components/bootstrap/grunt
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/grunt')
-rw-r--r--bower_components/bootstrap/grunt/.jshintrc7
-rw-r--r--bower_components/bootstrap/grunt/bs-commonjs-generator.js30
-rw-r--r--bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js9
-rw-r--r--bower_components/bootstrap/grunt/bs-lessdoc-parser.js25
-rw-r--r--bower_components/bootstrap/grunt/bs-raw-files-generator.js14
-rw-r--r--bower_components/bootstrap/grunt/configBridge.json46
-rw-r--r--bower_components/bootstrap/grunt/sauce_browsers.yml10
7 files changed, 112 insertions, 29 deletions
diff --git a/bower_components/bootstrap/grunt/.jshintrc b/bower_components/bootstrap/grunt/.jshintrc
new file mode 100644
index 0000000..0ea0495
--- /dev/null
+++ b/bower_components/bootstrap/grunt/.jshintrc
@@ -0,0 +1,7 @@
+{
+ "extends" : "../js/.jshintrc",
+ "asi" : false,
+ "browser" : false,
+ "es3" : false,
+ "node" : true
+}
diff --git a/bower_components/bootstrap/grunt/bs-commonjs-generator.js b/bower_components/bootstrap/grunt/bs-commonjs-generator.js
new file mode 100644
index 0000000..0b4ebbf
--- /dev/null
+++ b/bower_components/bootstrap/grunt/bs-commonjs-generator.js
@@ -0,0 +1,30 @@
+/*!
+ * Bootstrap Grunt task for the CommonJS module generation
+ * http://getbootstrap.com
+ * Copyright 2014-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+
+var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
+
+module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
+ var destDir = path.dirname(destFilepath);
+
+ function srcPathToDestRequire(srcFilepath) {
+ var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
+ return 'require(\'' + requirePath + '\')';
+ }
+
+ var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
+ try {
+ fs.writeFileSync(destFilepath, moduleOutputJs);
+ } catch (err) {
+ grunt.fail.warn(err);
+ }
+ grunt.log.writeln('File ' + destFilepath.cyan + ' created.');
+};
diff --git a/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
index 82dc727..af2a82e 100644
--- a/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
+++ b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
@@ -1,10 +1,12 @@
/*!
* Bootstrap Grunt task for Glyphicons data generation
* http://getbootstrap.com
- * Copyright 2014 Twitter, Inc.
+ * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
+
'use strict';
+
var fs = require('fs');
module.exports = function generateGlyphiconsData(grunt) {
@@ -14,7 +16,7 @@ module.exports = function generateGlyphiconsData(grunt) {
var glyphiconsLines = glyphiconsFile.split('\n');
// Use any line that starts with ".glyphicon-" and capture the class name
- var iconClassName = /^\.(glyphicon-[^\s]+)/;
+ var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/;
var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' +
'# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n';
var glyphiconsYml = 'docs/_data/glyphicons.yml';
@@ -33,8 +35,7 @@ module.exports = function generateGlyphiconsData(grunt) {
try {
fs.writeFileSync(glyphiconsYml, glyphiconsData);
- }
- catch (err) {
+ } catch (err) {
grunt.fail.warn(err);
}
grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
diff --git a/bower_components/bootstrap/grunt/bs-lessdoc-parser.js b/bower_components/bootstrap/grunt/bs-lessdoc-parser.js
index c1821de..5a9ed2b 100644
--- a/bower_components/bootstrap/grunt/bs-lessdoc-parser.js
+++ b/bower_components/bootstrap/grunt/bs-lessdoc-parser.js
@@ -1,16 +1,19 @@
/*!
* Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com
- * Copyright 2014 Twitter, Inc.
+ * Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
+
'use strict';
-var markdown = require('markdown').markdown;
+var Markdown = require('markdown-it');
function markdown2html(markdownString) {
+ var md = new Markdown();
+
// the slice removes the <p>...</p> wrapper output by Markdown processor
- return markdown.toHTML(markdownString.trim()).slice(3, -4);
+ return md.render(markdownString.trim()).slice(3, -5);
}
@@ -33,9 +36,9 @@ Mini-language:
var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
-var SECTION_DOCSTRING = /^[/]{2}#{2}(.*)$/;
-var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]+);[ ]*$/;
-var VAR_DOCSTRING = /^[/]{2}[*]{2}(.*)$/;
+var SECTION_DOCSTRING = /^[/]{2}#{2}(.+)$/;
+var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]*);[ ]*$/;
+var VAR_DOCSTRING = /^[/]{2}[*]{2}(.+)$/;
function Section(heading, customizable) {
this.heading = heading.trim();
@@ -119,7 +122,7 @@ Tokenizer.prototype._shift = function () {
return new VarDocstring(match[1]);
}
var commentStart = line.lastIndexOf('//');
- var varLine = (commentStart === -1) ? line : line.slice(0, commentStart);
+ var varLine = commentStart === -1 ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) {
return new Variable(match[1], match[2]);
@@ -166,8 +169,7 @@ Parser.prototype.parseSection = function () {
var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) {
section.docstring = docstring;
- }
- else {
+ } else {
this._tokenizer.unshift(docstring);
}
this.parseSubSections(section);
@@ -183,15 +185,14 @@ Parser.prototype.parseSubSections = function (section) {
// Presume an implicit initial subsection
subsection = new SubSection('');
this.parseVars(subsection);
- }
- else {
+ } else {
break;
}
}
section.addSubSection(subsection);
}
- if (section.subsections.length === 1 && !(section.subsections[0].heading) && section.subsections[0].variables.length === 0) {
+ if (section.subsections.length === 1 && !section.subsections[0].heading && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection
section.subsections = [];
}
diff --git a/bower_components/bootstrap/grunt/bs-raw-files-generator.js b/bower_components/bootstrap/grunt/bs-raw-files-generator.js
index ec8c531..39224e4 100644
--- a/bower_components/bootstrap/grunt/bs-raw-files-generator.js
+++ b/bower_components/bootstrap/grunt/bs-raw-files-generator.js
@@ -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.');
diff --git a/bower_components/bootstrap/grunt/configBridge.json b/bower_components/bootstrap/grunt/configBridge.json
new file mode 100644
index 0000000..8ce4c3d
--- /dev/null
+++ b/bower_components/bootstrap/grunt/configBridge.json
@@ -0,0 +1,46 @@
+{
+ "paths": {
+ "customizerJs": [
+ "../assets/js/vendor/autoprefixer.js",
+ "../assets/js/vendor/less.min.js",
+ "../assets/js/vendor/jszip.min.js",
+ "../assets/js/vendor/uglify.min.js",
+ "../assets/js/vendor/Blob.js",
+ "../assets/js/vendor/FileSaver.js",
+ "../assets/js/raw-files.min.js",
+ "../assets/js/src/customizer.js"
+ ],
+ "docsJs": [
+ "../assets/js/vendor/holder.min.js",
+ "../assets/js/vendor/ZeroClipboard.min.js",
+ "../assets/js/vendor/anchor.js",
+ "../assets/js/src/application.js"
+ ]
+ },
+ "config": {
+ "autoprefixerBrowsers": [
+ "Android 2.3",
+ "Android >= 4",
+ "Chrome >= 20",
+ "Firefox >= 24",
+ "Explorer >= 8",
+ "iOS >= 6",
+ "Opera >= 12",
+ "Safari >= 6"
+ ],
+ "jqueryCheck": [
+ "if (typeof jQuery === 'undefined') {",
+ " throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
+ "}\n"
+ ],
+ "jqueryVersionCheck": [
+ "+function ($) {",
+ " 'use strict';",
+ " var version = $.fn.jquery.split(' ')[0].split('.')",
+ " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {",
+ " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')",
+ " }",
+ "}(jQuery);\n\n"
+ ]
+ }
+} \ No newline at end of file
diff --git a/bower_components/bootstrap/grunt/sauce_browsers.yml b/bower_components/bootstrap/grunt/sauce_browsers.yml
index 8014bfc..6267f35 100644
--- a/bower_components/bootstrap/grunt/sauce_browsers.yml
+++ b/bower_components/bootstrap/grunt/sauce_browsers.yml
@@ -3,15 +3,15 @@
{
browserName: "safari",
- platform: "OS X 10.9"
+ platform: "OS X 10.10"
},
{
browserName: "chrome",
- platform: "OS X 10.9"
+ platform: "OS X 10.10"
},
{
browserName: "firefox",
- platform: "OS X 10.9"
+ platform: "OS X 10.10"
},
# Mac Opera not currently supported by Sauce Labs
@@ -56,8 +56,8 @@
{
browserName: "iphone",
- platform: "OS X 10.9",
- version: "7.1"
+ platform: "OS X 10.10",
+ version: "8.2"
},
# iOS Chrome not currently supported by Sauce Labs