aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBass Jobsen <[email protected]>2015-12-24 18:12:09 +0100
committerChris Rebert <[email protected]>2015-12-24 19:49:26 -0700
commit4445c4f0f3f0c02d9cfa6663927e250f82b56db6 (patch)
treeb2174818e1e11a078b5a6df768c44e55b8542499
parent99dfd882194deb9ed0e84a3463ef048771624779 (diff)
downloadbootstrap-4445c4f0f3f0c02d9cfa6663927e250f82b56db6.tar.xz
bootstrap-4445c4f0f3f0c02d9cfa6663927e250f82b56db6.zip
Move Autoprefixer settings out of Gruntfile.js and into a separate file
Refs #18584 Closes #18659 [skip sauce] [skip validator]
-rw-r--r--Gruntfile.js33
-rw-r--r--grunt/autoprefixer-settings.js33
2 files changed, 35 insertions, 31 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index aae5b5479..53e420974 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -21,37 +21,8 @@ module.exports = function (grunt) {
var isTravis = require('is-travis');
var npmShrinkwrap = require('npm-shrinkwrap');
var mq4HoverShim = require('mq4-hover-shim');
- var autoprefixer = require('autoprefixer')({
- browsers: [
- //
- // Official browser support policy:
- // http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers
- //
- 'Chrome >= 35', // Exact version number here is kinda arbitrary
- // Rather than using Autoprefixer's native "Firefox ESR" version specifier string,
- // we deliberately hardcode the number. This is to avoid unwittingly severely breaking the previous ESR in the event that:
- // (a) we happen to ship a new Bootstrap release soon after the release of a new ESR,
- // such that folks haven't yet had a reasonable amount of time to upgrade; and
- // (b) the new ESR has unprefixed CSS properties/values whose absence would severely break webpages
- // (e.g. `box-sizing`, as opposed to `background: linear-gradient(...)`).
- // Since they've been unprefixed, Autoprefixer will stop prefixing them,
- // thus causing them to not work in the previous ESR (where the prefixes were required).
- 'Firefox >= 31', // Current Firefox Extended Support Release (ESR)
- // Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
- // NOT the Edge app version shown in Edge's "About" screen.
- // For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
- // See also https://github.com/Fyrd/caniuse/issues/1928
- 'Edge >= 12',
- 'Explorer >= 9',
- // Out of leniency, we prefix these 1 version further back than the official policy.
- 'iOS >= 8',
- 'Safari >= 8',
- // The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
- 'Android 2.3',
- 'Android >= 4',
- 'Opera >= 12'
- ]
- });
+ var autoprefixerSettings = require('./grunt/autoprefixer-settings.js');
+ var autoprefixer = require('autoprefixer')(autoprefixerSettings.settings);
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
diff --git a/grunt/autoprefixer-settings.js b/grunt/autoprefixer-settings.js
new file mode 100644
index 000000000..2988d3b2b
--- /dev/null
+++ b/grunt/autoprefixer-settings.js
@@ -0,0 +1,33 @@
+module.exports = {
+ settings: {
+ browsers: [
+ //
+ // Official browser support policy:
+ // http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers
+ //
+ 'Chrome >= 35', // Exact version number here is kinda arbitrary
+ // Rather than using Autoprefixer's native "Firefox ESR" version specifier string,
+ // we deliberately hardcode the number. This is to avoid unwittingly severely breaking the previous ESR in the event that:
+ // (a) we happen to ship a new Bootstrap release soon after the release of a new ESR,
+ // such that folks haven't yet had a reasonable amount of time to upgrade; and
+ // (b) the new ESR has unprefixed CSS properties/values whose absence would severely break webpages
+ // (e.g. `box-sizing`, as opposed to `background: linear-gradient(...)`).
+ // Since they've been unprefixed, Autoprefixer will stop prefixing them,
+ // thus causing them to not work in the previous ESR (where the prefixes were required).
+ 'Firefox >= 31', // Current Firefox Extended Support Release (ESR)
+ // Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
+ // NOT the Edge app version shown in Edge's "About" screen.
+ // For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
+ // See also https://github.com/Fyrd/caniuse/issues/1928
+ 'Edge >= 12',
+ 'Explorer >= 9',
+ // Out of leniency, we prefix these 1 version further back than the official policy.
+ 'iOS >= 8',
+ 'Safari >= 8',
+ // The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
+ 'Android 2.3',
+ 'Android >= 4',
+ 'Opera >= 12'
+ ]
+ }
+}