From 3c4ba2a08cef519f2135922f0549bf787cf3010d Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 19 Jun 2014 10:47:55 -0700 Subject: Switch to uber/npm-shrinkwrap for npm-shrinkwrap.json generation Instead of our homegrown grunt/shrinkwrap.js Fixes #13483. New npm-shrinkwrap.json is human-readable but still in a consistent/stable format. Should aid debugging, produce better diffs, and be less prone to merge conflicts --- grunt/shrinkwrap.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 grunt/shrinkwrap.js (limited to 'grunt') diff --git a/grunt/shrinkwrap.js b/grunt/shrinkwrap.js deleted file mode 100644 index 270fcb7b1..000000000 --- a/grunt/shrinkwrap.js +++ /dev/null @@ -1,41 +0,0 @@ -/*! - * Bootstrap Grunt task for generating npm-shrinkwrap.canonical.json - * http://getbootstrap.com - * Copyright 2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -/* -This Grunt task updates the npm-shrinkwrap.canonical.json file that's used as the key for Bootstrap's npm packages cache. -This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. -*/ -'use strict'; -var canonicallyJsonStringify = require('canonical-json'); -var NON_CANONICAL_FILE = 'npm-shrinkwrap.json'; -var DEST_FILE = 'test-infra/npm-shrinkwrap.canonical.json'; - - -function cleanup(shrinkwrap) { - // Remove `resolved` property to avoid irrelevant changes - // See https://github.com/npm/npm/issues/3581 - if (typeof shrinkwrap === 'string') { - return shrinkwrap; - } - delete shrinkwrap.resolved; - for (var key in shrinkwrap) { - shrinkwrap[key] = cleanup(shrinkwrap[key]); - } - return shrinkwrap; -} - -function updateShrinkwrap(grunt) { - // Assumption: Non-canonical shrinkwrap already generated by prerequisite Grunt task - var shrinkwrapData = grunt.file.readJSON(NON_CANONICAL_FILE); - grunt.log.writeln('Deleting ' + NON_CANONICAL_FILE.cyan + '...'); - grunt.file.delete(NON_CANONICAL_FILE); - // Output as Canonical JSON in correct location - grunt.file.write(DEST_FILE, canonicallyJsonStringify(cleanup(shrinkwrapData))); - grunt.log.writeln('File ' + DEST_FILE.cyan + ' updated.'); -} - - -module.exports = updateShrinkwrap; -- cgit v1.2.3 From 6352c85a654bd92651948e4ffcd7b088a2534d84 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 10 Jun 2014 12:23:48 -0700 Subject: reenable OS X Chrome in Sauce --- grunt/sauce_browsers.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'grunt') diff --git a/grunt/sauce_browsers.yml b/grunt/sauce_browsers.yml index 4024a189b..d58919861 100644 --- a/grunt/sauce_browsers.yml +++ b/grunt/sauce_browsers.yml @@ -5,11 +5,10 @@ browserName: "safari", platform: "OS X 10.9" }, - # { - # browserName: "chrome", - # platform: "OS X 10.9", - # version: "31" - # }, + { + browserName: "chrome", + platform: "OS X 10.9" + }, { browserName: "firefox", platform: "OS X 10.9" -- cgit v1.2.3 From 532dffdd46f1da2f557f6095d9f128ee64e4729e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 10 Jun 2014 12:24:56 -0700 Subject: reenable Win7 IE8-9 in Sauce --- grunt/sauce_browsers.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'grunt') diff --git a/grunt/sauce_browsers.yml b/grunt/sauce_browsers.yml index d58919861..8014bfcb8 100644 --- a/grunt/sauce_browsers.yml +++ b/grunt/sauce_browsers.yml @@ -26,16 +26,16 @@ version: "10", platform: "Windows 8" }, - # { - # browserName: "internet explorer", - # version: "9", - # platform: "Windows 7" - # }, - # { - # browserName: "internet explorer", - # version: "8", - # platform: "Windows 7" - # }, + { + browserName: "internet explorer", + version: "9", + platform: "Windows 7" + }, + { + browserName: "internet explorer", + version: "8", + platform: "Windows 7" + }, # { # Unofficial # browserName: "internet explorer", -- cgit v1.2.3 From 36b530892600648a6d6a24dd2520f84839cc0ace Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 7 Jul 2014 11:00:32 -0700 Subject: remove Glyphicons docs autogeneration from Grunt Simplifies the build tooling a teeny bit. This data file shouldn't need to be updated for v3 ever again. This task will also be unnecessary in v4. [skip sauce] [skip validator] --- grunt/bs-glyphicons-data-generator.js | 41 ----------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 grunt/bs-glyphicons-data-generator.js (limited to 'grunt') diff --git a/grunt/bs-glyphicons-data-generator.js b/grunt/bs-glyphicons-data-generator.js deleted file mode 100644 index 82dc727b6..000000000 --- a/grunt/bs-glyphicons-data-generator.js +++ /dev/null @@ -1,41 +0,0 @@ -/*! - * 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-[^\s]+)/; - 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.'); -}; -- cgit v1.2.3 From c3ae289f4a9e5fc14e489e3914d150954469f1ac Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 10 Jul 2014 16:57:26 -0700 Subject: Gruntfile-specific JSHint config: disable ASI Refs #14118 --- grunt/.jshintrc | 1 + 1 file changed, 1 insertion(+) (limited to 'grunt') diff --git a/grunt/.jshintrc b/grunt/.jshintrc index 78df94b9b..0ea0495e9 100644 --- a/grunt/.jshintrc +++ b/grunt/.jshintrc @@ -1,5 +1,6 @@ { "extends" : "../js/.jshintrc", + "asi" : false, "browser" : false, "es3" : false, "node" : true -- cgit v1.2.3