summaryrefslogtreecommitdiff
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/bs-glyphicons-data-generator.js41
-rw-r--r--bower_components/bootstrap/grunt/configBridge.json1
-rw-r--r--bower_components/bootstrap/grunt/sauce_browsers.yml8
3 files changed, 46 insertions, 4 deletions
diff --git a/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
new file mode 100644
index 00000000..339fd0ff
--- /dev/null
+++ b/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js
@@ -0,0 +1,41 @@
+/*!
+ * Bootstrap Grunt task for Glyphicons data generation
+ * http://getbootstrap.com
+ * Copyright 2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+'use strict';
+var fs = require('fs');
+
+module.exports = function generateGlyphiconsData(grunt) {
+ // Pass encoding, utf8, so `readFileSync` will return a string instead of a
+ // buffer
+ var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8');
+ var glyphiconsLines = glyphiconsFile.split('\n');
+
+ // Use any line that starts with ".glyphicon-" and capture the class name
+ 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';
+ for (var i = 0, len = glyphiconsLines.length; i < len; i++) {
+ var match = glyphiconsLines[i].match(iconClassName);
+
+ if (match !== null) {
+ glyphiconsData += '- ' + match[1] + '\n';
+ }
+ }
+
+ // Create the `_data` directory if it doesn't already exist
+ if (!fs.existsSync('docs/_data')) {
+ fs.mkdirSync('docs/_data');
+ }
+
+ try {
+ fs.writeFileSync(glyphiconsYml, glyphiconsData);
+ }
+ catch (err) {
+ grunt.fail.warn(err);
+ }
+ grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');
+};
diff --git a/bower_components/bootstrap/grunt/configBridge.json b/bower_components/bootstrap/grunt/configBridge.json
index 84ff7187..78e7aae5 100644
--- a/bower_components/bootstrap/grunt/configBridge.json
+++ b/bower_components/bootstrap/grunt/configBridge.json
@@ -34,6 +34,7 @@
],
"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')",
diff --git a/bower_components/bootstrap/grunt/sauce_browsers.yml b/bower_components/bootstrap/grunt/sauce_browsers.yml
index c895bab2..04e90928 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
@@ -57,7 +57,7 @@
{
browserName: "iphone",
platform: "OS X 10.9",
- version: "8.0"
+ version: "8.1"
},
# iOS Chrome not currently supported by Sauce Labs