mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
fix #12274
This commit is contained in:
parent
c5bed1a850
commit
ffdc18cbbf
26
Gruntfile.js
26
Gruntfile.js
@ -7,14 +7,14 @@ module.exports = function (grunt) {
|
||||
grunt.util.linefeed = '\n';
|
||||
|
||||
RegExp.quote = function (string) {
|
||||
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
}
|
||||
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
};
|
||||
|
||||
var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js')
|
||||
var fs = require('fs')
|
||||
var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js')
|
||||
var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js')
|
||||
var path = require('path')
|
||||
var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js');
|
||||
var fs = require('fs');
|
||||
var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js');
|
||||
var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js');
|
||||
var path = require('path');
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
@ -325,8 +325,8 @@ module.exports = function (grunt) {
|
||||
sed: {
|
||||
versionNumber: {
|
||||
pattern: (function () {
|
||||
var old = grunt.option('oldver')
|
||||
return old ? RegExp.quote(old) : old
|
||||
var old = grunt.option('oldver');
|
||||
return old ? RegExp.quote(old) : old;
|
||||
})(),
|
||||
replacement: grunt.option('newver'),
|
||||
recursive: true
|
||||
@ -364,16 +364,16 @@ module.exports = function (grunt) {
|
||||
testSubtasks.push('validate-html');
|
||||
}
|
||||
// Only run Sauce Labs tests if there's a Sauce access key
|
||||
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined'
|
||||
if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
|
||||
// Skip Sauce if running a different subset of the test suite
|
||||
&& (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
|
||||
(!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
|
||||
testSubtasks.push('connect');
|
||||
testSubtasks.push('saucelabs-qunit');
|
||||
}
|
||||
// Only run BrowserStack tests if there's a BrowserStack access key
|
||||
if (typeof process.env.BROWSERSTACK_KEY !== 'undefined'
|
||||
if (typeof process.env.BROWSERSTACK_KEY !== 'undefined' &&
|
||||
// Skip BrowserStack if running a different subset of the test suite
|
||||
&& (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'browserstack-js-unit')) {
|
||||
(!process.env.TWBS_TEST || process.env.TWBS_TEST === 'browserstack-js-unit')) {
|
||||
testSubtasks.push('browserstack_runner');
|
||||
}
|
||||
grunt.registerTask('test', testSubtasks);
|
||||
|
Loading…
x
Reference in New Issue
Block a user