diff options
Diffstat (limited to 'vendor/twbs/bootstrap/build')
-rw-r--r-- | vendor/twbs/bootstrap/build/.htmllintrc | 44 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/banner.js | 14 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/build-plugins.js | 82 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/change-version.js | 4 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/gcp-key.json.enc | bin | 2304 -> 0 bytes | |||
-rw-r--r-- | vendor/twbs/bootstrap/build/generate-sri.js | 22 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/lint-vars.js | 82 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/rollup.config.js | 9 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/sauce_browsers.json | 65 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/saucelabs-unit-test.js | 116 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/ship.sh | 24 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/svgo.yml | 57 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/vnu-jar.js | 7 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/workbox.config.json | 8 | ||||
-rw-r--r-- | vendor/twbs/bootstrap/build/workbox.js | 58 |
15 files changed, 137 insertions, 455 deletions
diff --git a/vendor/twbs/bootstrap/build/.htmllintrc b/vendor/twbs/bootstrap/build/.htmllintrc deleted file mode 100644 index d5cf54f5b..000000000 --- a/vendor/twbs/bootstrap/build/.htmllintrc +++ /dev/null @@ -1,44 +0,0 @@ -{ - "attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling"], - "attr-name-style": false, - "attr-no-dup": true, - "attr-no-unsafe-char": true, - "attr-quote-style": "double", - "attr-req-value": true, - "attr-validate": false, - "class-no-dup": true, - "class-style": "none", - "doctype-first": true, - "doctype-html5": true, - "fig-req-figcaption": false, - "focusable-tabindex-style": true, - "head-req-title": true, - "head-valid-content-model": false, - "href-style": false, - "html-req-lang": true, - "html-valid-content-model": false, - "id-class-ignore-regex": "(onclick|content|[a-z]+([A-Z][a-z])+)", - "id-class-no-ad": true, - "id-class-style": false, - "id-no-dup": true, - "img-req-alt": "allownull", - "img-req-src": false, - "indent-style": "spaces", - "indent-width": 2, - "input-radio-req-name": false, - "input-req-label": false, - "label-req-for": true, - "lang-style": "case", - "line-no-trailing-whitespace": false, - "line-end-style": "lf", - "spec-char-escape": false, - "table-req-header": false, - "tag-bans": ["b", "i"], - "tag-close": true, - "tag-name-lowercase": true, - "tag-name-match": true, - "tag-self-close": false, - "text-ignore-regex": false, - "title-max-len": 70, - "title-no-dup": true -} diff --git a/vendor/twbs/bootstrap/build/banner.js b/vendor/twbs/bootstrap/build/banner.js new file mode 100644 index 000000000..453fc3b6e --- /dev/null +++ b/vendor/twbs/bootstrap/build/banner.js @@ -0,0 +1,14 @@ +'use strict' + +const pkg = require('../package.json') +const year = new Date().getFullYear() + +function getBanner(pluginFilename) { + return `/*! + * Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage}) + * Copyright 2011-${year} ${pkg.author} + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */` +} + +module.exports = getBanner diff --git a/vendor/twbs/bootstrap/build/build-plugins.js b/vendor/twbs/bootstrap/build/build-plugins.js index 22a179066..abcbc5e2f 100644 --- a/vendor/twbs/bootstrap/build/build-plugins.js +++ b/vendor/twbs/bootstrap/build/build-plugins.js @@ -1,17 +1,18 @@ /*! * Script to build our plugins to use them separately. - * Copyright 2018 The Bootstrap Authors - * Copyright 2018 Twitter, Inc. + * Copyright 2019 The Bootstrap Authors + * Copyright 2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ 'use strict' -const rollup = require('rollup') const path = require('path') +const rollup = require('rollup') const babel = require('rollup-plugin-babel') -const TEST = process.env.NODE_ENV === 'test' +const banner = require('./banner.js') +const TEST = process.env.NODE_ENV === 'test' const plugins = [ babel({ exclude: 'node_modules/**', // Only transpile our source code @@ -24,9 +25,6 @@ const plugins = [ ] }) ] - -const format = 'umd' -const rootPath = !TEST ? '../js/dist/' : '../js/coverage/dist/' const bsPlugins = { Alert: path.resolve(__dirname, '../js/src/alert.js'), Button: path.resolve(__dirname, '../js/src/button.js'), @@ -37,45 +35,51 @@ const bsPlugins = { Popover: path.resolve(__dirname, '../js/src/popover.js'), ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'), Tab: path.resolve(__dirname, '../js/src/tab.js'), + Toast: path.resolve(__dirname, '../js/src/toast.js'), Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'), Util: path.resolve(__dirname, '../js/src/util.js') } +const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/' + +function build(plugin) { + console.log(`Building ${plugin} plugin...`) -Object.keys(bsPlugins) - .forEach((pluginKey) => { - console.log(`Building ${pluginKey} plugin...`) + const external = ['jquery', 'popper.js'] + const globals = { + jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode + 'popper.js': 'Popper' + } - const external = ['jquery', 'popper.js'] - const globals = { - jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode - 'popper.js': 'Popper' - } + // Do not bundle Util in plugins + if (plugin !== 'Util') { + external.push(bsPlugins.Util) + globals[bsPlugins.Util] = 'Util' + } - // Do not bundle Util in plugins - if (pluginKey !== 'Util') { - external.push(bsPlugins.Util) - globals[bsPlugins.Util] = 'Util' - } + // Do not bundle Tooltip in Popover + if (plugin === 'Popover') { + external.push(bsPlugins.Tooltip) + globals[bsPlugins.Tooltip] = 'Tooltip' + } - // Do not bundle Tooltip in Popover - if (pluginKey === 'Popover') { - external.push(bsPlugins.Tooltip) - globals[bsPlugins.Tooltip] = 'Tooltip' - } + const pluginFilename = `${plugin.toLowerCase()}.js` - rollup.rollup({ - input: bsPlugins[pluginKey], - plugins, - external - }).then((bundle) => { - bundle.write({ - format, - name: pluginKey, - sourcemap: true, - globals, - file: path.resolve(__dirname, `${rootPath}${pluginKey.toLowerCase()}.js`) - }) - .then(() => console.log(`Building ${pluginKey} plugin... Done !`)) - .catch((err) => console.error(`${pluginKey}: ${err}`)) + rollup.rollup({ + input: bsPlugins[plugin], + plugins, + external + }).then((bundle) => { + bundle.write({ + banner: banner(pluginFilename), + format: 'umd', + name: plugin, + sourcemap: true, + globals, + file: path.resolve(__dirname, `${rootPath}${pluginFilename}`) }) + .then(() => console.log(`Building ${plugin} plugin... Done!`)) + .catch((err) => console.error(`${plugin}: ${err}`)) }) +} + +Object.keys(bsPlugins).forEach((plugin) => build(plugin)) diff --git a/vendor/twbs/bootstrap/build/change-version.js b/vendor/twbs/bootstrap/build/change-version.js index 7102dc083..f1b4f747a 100644 --- a/vendor/twbs/bootstrap/build/change-version.js +++ b/vendor/twbs/bootstrap/build/change-version.js @@ -2,8 +2,8 @@ /*! * Script to update version number references in the project. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. + * Copyright 2017-2019 The Bootstrap Authors + * Copyright 2017-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ diff --git a/vendor/twbs/bootstrap/build/gcp-key.json.enc b/vendor/twbs/bootstrap/build/gcp-key.json.enc Binary files differdeleted file mode 100644 index 6e1856a2f..000000000 --- a/vendor/twbs/bootstrap/build/gcp-key.json.enc +++ /dev/null diff --git a/vendor/twbs/bootstrap/build/generate-sri.js b/vendor/twbs/bootstrap/build/generate-sri.js index 10936e8a1..a93f3e538 100644 --- a/vendor/twbs/bootstrap/build/generate-sri.js +++ b/vendor/twbs/bootstrap/build/generate-sri.js @@ -5,18 +5,20 @@ * Remember to use the same vendor files as the CDN ones, * otherwise the hashes won't match! * - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. + * Copyright 2017-2019 The Bootstrap Authors + * Copyright 2017-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ 'use strict' +const crypto = require('crypto') const fs = require('fs') const path = require('path') -const sriToolbox = require('sri-toolbox') const sh = require('shelljs') +const pkg = require('../package.json') + sh.config.fatal = true const configFile = path.join(__dirname, '../_config.yml') @@ -34,11 +36,15 @@ const files = [ configPropertyName: 'js_hash' }, { - file: 'site/docs/4.1/assets/js/vendor/jquery-slim.min.js', + file: 'dist/js/bootstrap.bundle.min.js', + configPropertyName: 'js_bundle_hash' + }, + { + file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`, configPropertyName: 'jquery_hash' }, { - file: 'site/docs/4.1/assets/js/vendor/popper.min.js', + file: 'node_modules/popper.js/dist/umd/popper.min.js', configPropertyName: 'popper_hash' } ] @@ -49,9 +55,9 @@ files.forEach((file) => { throw err } - const integrity = sriToolbox.generate({ - algorithms: ['sha384'] - }, data) + const algo = 'sha384' + const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64') + const integrity = `${algo}-${hash}` console.log(`${file.configPropertyName}: ${integrity}`) diff --git a/vendor/twbs/bootstrap/build/lint-vars.js b/vendor/twbs/bootstrap/build/lint-vars.js deleted file mode 100644 index 1b8d71cc6..000000000 --- a/vendor/twbs/bootstrap/build/lint-vars.js +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to find unused Sass variables. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -'use strict' - -const fs = require('fs') -const path = require('path') -const glob = require('glob') - -// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 -function regExpQuote(str) { - return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') -} - -let globalSuccess = true - -function findUnusedVars(dir) { - if (!(fs.existsSync(dir) && fs.statSync(dir).isDirectory())) { - console.log(`"${dir}": Not a valid directory!`) - process.exit(1) - } - - console.log(`Finding unused variables in "${dir}"...`) - - // A variable to handle success/failure message in this function - let unusedVarsFound = false - - // Array of all Sass files' content - const sassFiles = glob.sync(path.join(dir, '**/*.scss')) - // String of all Sass files' content - let sassFilesString = '' - - sassFiles.forEach((file) => { - sassFilesString += fs.readFileSync(file, 'utf8') - }) - - // Array of all Sass variables - const variables = sassFilesString.match(/(^\$[a-zA-Z0-9_-]+[^:])/gm) - - console.log(`Found ${variables.length} total variables.`) - - // Loop through each variable - variables.forEach((variable) => { - const re = new RegExp(regExpQuote(variable), 'g') - const count = (sassFilesString.match(re) || []).length - - if (count === 1) { - console.log(`Variable "${variable}" is not being used.`) - unusedVarsFound = true - globalSuccess = false - } - }) - - if (unusedVarsFound === false) { - console.log(`No unused variables found in "${dir}".`) - } -} - -function main(args) { - if (args.length < 1) { - console.log('Wrong arguments!') - console.log('Usage: lint-vars.js folder [, folder2...]') - process.exit(1) - } - - args.forEach((arg) => { - findUnusedVars(arg) - }) - - if (globalSuccess === false) { - process.exit(1) - } -} - -// The first and second args are: path/to/node script.js -main(process.argv.slice(2)) diff --git a/vendor/twbs/bootstrap/build/rollup.config.js b/vendor/twbs/bootstrap/build/rollup.config.js index 93370d31d..e81a07ef5 100644 --- a/vendor/twbs/bootstrap/build/rollup.config.js +++ b/vendor/twbs/bootstrap/build/rollup.config.js @@ -3,10 +3,9 @@ const path = require('path') const babel = require('rollup-plugin-babel') const resolve = require('rollup-plugin-node-resolve') +const banner = require('./banner.js') -const pkg = require(path.resolve(__dirname, '../package.json')) const BUNDLE = process.env.BUNDLE === 'true' -const year = new Date().getFullYear() let fileDest = 'bootstrap.js' const external = ['jquery', 'popper.js'] @@ -38,11 +37,7 @@ if (BUNDLE) { module.exports = { input: path.resolve(__dirname, '../js/src/index.js'), output: { - banner: `/*! - * Bootstrap v${pkg.version} (${pkg.homepage}) - * Copyright 2011-${year} ${pkg.author} - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */`, + banner, file: path.resolve(__dirname, `../dist/js/${fileDest}`), format: 'umd', globals, diff --git a/vendor/twbs/bootstrap/build/sauce_browsers.json b/vendor/twbs/bootstrap/build/sauce_browsers.json deleted file mode 100644 index b112d9c5b..000000000 --- a/vendor/twbs/bootstrap/build/sauce_browsers.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - { - "browserName": "safari", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "chrome", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "MicrosoftEdge", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "internet explorer", - "version": "11", - "platform": "Windows 8.1" - }, - { - "browserName": "internet explorer", - "version": "10", - "platform": "Windows 8" - }, - { - "browserName": "chrome", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "iphone", - "deviceName": "iPhone Simulator", - "platformName": "OS X 10.11", - "version": "9.3" - }, - { - "browserName": "chrome", - "platform": "Linux", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "Linux", - "version": "latest" - }, - { - "platform": "Linux", - "browserName": "android", - "deviceName": "Android Emulator", - "version": "latest", - "deviceType": "phone" - } -] diff --git a/vendor/twbs/bootstrap/build/saucelabs-unit-test.js b/vendor/twbs/bootstrap/build/saucelabs-unit-test.js deleted file mode 100644 index b4d952536..000000000 --- a/vendor/twbs/bootstrap/build/saucelabs-unit-test.js +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * Script to run our Sauce Labs tests. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/* -Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator -Mac Opera is not currently supported by Sauce Labs -Win Opera 15+ is not currently supported by Sauce Labs -iOS Chrome is not currently supported by Sauce Labs -*/ - -'use strict' - -const path = require('path') -const JSUnitSaucelabs = require('jsunitsaucelabs') - -const jsUnitSaucelabs = new JSUnitSaucelabs({ - username: process.env.SAUCE_USERNAME, - password: process.env.SAUCE_ACCESS_KEY, - build: process.env.TRAVIS_JOB_ID -}) - -const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed' -const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json')) -const errorMessages = [ - 'Test exceeded maximum duration', - 'Test exceeded maximum duration after 180 seconds' -] -let jobsDone = 0 -let jobsSucceeded = 0 - -const waitingCallback = (error, body, id) => { - if (error) { - console.error(error) - process.exit(1) - } - - if (typeof body !== 'undefined') { - if (!body.completed) { - setTimeout(() => { - jsUnitSaucelabs.getStatus(id, (error, body) => { - waitingCallback(error, body, id) - }) - }, 2000) - } else { - const test = body['js tests'][0] - const platform = test.platform.join(', ') - let passed = false - let errorStr = false - - if (test.result !== null) { - if (typeof test.result === 'string' && errorMessages.includes(test.result)) { - errorStr = test.result - } else { - passed = test.result.total === test.result.passed - } - } - - console.log(`Tested ${testURL}`) - console.log(`Platform: ${platform}`) - console.log(`Passed: ${passed}`) - console.log(`URL: ${test.url}\n`) - - if (errorStr) { - console.error(`${platform}: ${errorStr}`) - } - - if (passed) { - jobsSucceeded++ - } - jobsDone++ - - // Exit - if (jobsDone === browsersFile.length - 1) { - jsUnitSaucelabs.stop() - if (jobsDone > jobsSucceeded) { - const failedTests = jobsDone - jobsSucceeded - throw new Error(`${failedTests} test${failedTests > 1 ? 's' : ''} failed.`) - } - - console.log('All tests passed') - process.exit(0) - } - } - } -} - -jsUnitSaucelabs.on('tunnelCreated', () => { - browsersFile.forEach((tmpBrowser) => { - const browsersPlatform = typeof tmpBrowser.platform === 'undefined' ? tmpBrowser.platformName : tmpBrowser.platform - const browsersArray = [browsersPlatform, tmpBrowser.browserName, tmpBrowser.version] - - jsUnitSaucelabs.start([browsersArray], testURL, 'qunit', (error, success) => { - if (typeof success !== 'undefined') { - const taskIds = success['js tests'] - - if (!taskIds || taskIds.length === 0) { - throw new Error('Error starting tests through Sauce Labs API') - } - - taskIds.forEach((id) => { - jsUnitSaucelabs.getStatus(id, (error, body) => { - waitingCallback(error, body, id) - }) - }) - } else { - console.error(error) - } - }) - }) -}) - -jsUnitSaucelabs.initTunnel() diff --git a/vendor/twbs/bootstrap/build/ship.sh b/vendor/twbs/bootstrap/build/ship.sh index e3b256e91..289284383 100644 --- a/vendor/twbs/bootstrap/build/ship.sh +++ b/vendor/twbs/bootstrap/build/ship.sh @@ -34,29 +34,11 @@ printf "\n%sUpdating version number...%s" $magenta $end printf "\n%s=======================================================\n%s" $magenta $end npm run release-version "$current_version" "$1" -# Compile latest CSS and JS +# Build release printf "\n%s=======================================================%s" $magenta $end -printf "\n%sCompile latest CSS and JS...%s" $magenta $end +printf "\n%sBuilding release...%s" $magenta $end printf "\n%s=======================================================\n%s" $magenta $end -npm run dist - -# Generate the SRI hashes -printf "\n%s=======================================================%s" $magenta $end -printf "\n%sGenerate the SRI hashes...%s" $magenta $end -printf "\n%s=======================================================\n%s" $magenta $end -npm run release-sri - -# Compress the dist files -printf "\n%s=======================================================%s" $magenta $end -printf "\n%sCompressing the dist files...%s" $magenta $end -printf "\n%s=======================================================\n%s" $magenta $end -npm run release-zip - -# Compile the docs -printf "\n%s=======================================================%s" $magenta $end -printf "\n%sCompile hosted documentation...%s" $magenta $end -printf "\n%s=======================================================\n%s" $magenta $end -npm run docs-github +npm run release # Copy the contents of the built docs site over to `bs-docs` repo printf "\n%s=======================================================%s" $magenta $end diff --git a/vendor/twbs/bootstrap/build/svgo.yml b/vendor/twbs/bootstrap/build/svgo.yml new file mode 100644 index 000000000..047e6947f --- /dev/null +++ b/vendor/twbs/bootstrap/build/svgo.yml @@ -0,0 +1,57 @@ +# Usage: +# install svgo globally: `npm i -g svgo` +# svgo --config=build/svgo.yml --input=foo.svg + +# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md +# replace default config + +multipass: true +#full: true + +# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options + +js2svg: + pretty: true + indent: 2 + +plugins: + # remove this with IE 11 is no longer supported + - addAttributesToSVGElement: + attributes: + - focusable: false + - cleanupAttrs: true + - cleanupEnableBackground: true + - cleanupIDs: true + - cleanupListOfValues: true + - cleanupNumericValues: true + - collapseGroups: true + - convertColors: true + - convertPathData: true + - convertShapeToPath: true + - convertStyleToAttrs: true + - convertTransform: true + - inlineStyles: true + - mergePaths: true + - minifyStyles: true + - moveElemsAttrsToGroup: true + - moveGroupAttrsToElems: true + - removeComments: true + - removeDesc: true + - removeDoctype: true + - removeEditorsNSData: true + - removeEmptyAttrs: true + - removeEmptyContainers: true + - removeEmptyText: true + - removeHiddenElems: true + - removeMetadata: true + - removeNonInheritableGroupAttrs: true + - removeTitle: false + - removeUnknownsAndDefaults: + keepRoleAttr: true + - removeUnusedNS: true + - removeUselessDefs: true + - removeUselessStrokeAndFill: true + - removeViewBox: false + - removeXMLNS: false + - removeXMLProcInst: true + - sortAttrs: true diff --git a/vendor/twbs/bootstrap/build/vnu-jar.js b/vendor/twbs/bootstrap/build/vnu-jar.js index 111e03409..7d549cb01 100644 --- a/vendor/twbs/bootstrap/build/vnu-jar.js +++ b/vendor/twbs/bootstrap/build/vnu-jar.js @@ -2,8 +2,8 @@ /*! * Script to run vnu-jar if Java is available. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. + * Copyright 2017-2019 The Bootstrap Authors + * Copyright 2017-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ @@ -27,9 +27,6 @@ childProcess.exec('java -version', (error, stdout, stderr) => { // Firefox's non-standard autocomplete behavior - see https://bugzilla.mozilla.org/show_bug.cgi?id=654072 'Attribute “autocomplete” is only allowed when the input type is.*', 'Attribute “autocomplete” not allowed on element “button” at this point.', - // We use holder.js with `data-src` and no `src` to avoid 404 errors; - // we could work around this, but I'm not sure it's worth it. - 'Element “img” is missing required attribute “src”.', // Markup used in Components → Forms → Layout → Form grid → Horizontal form is currently invalid, // but used this way due to lack of support for flexbox layout on <fieldset> element in most browsers 'Element “legend” not allowed as child of element “div” in this context.*', diff --git a/vendor/twbs/bootstrap/build/workbox.config.json b/vendor/twbs/bootstrap/build/workbox.config.json deleted file mode 100644 index a649431ed..000000000 --- a/vendor/twbs/bootstrap/build/workbox.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "globDirectory": "./", - "globPatterns": [ - "_gh_pages/**/*.{html,css,js,json,png,svg}" - ], - "swSrc": "./site/sw.js", - "swDest": "./_gh_pages/sw.js" -} diff --git a/vendor/twbs/bootstrap/build/workbox.js b/vendor/twbs/bootstrap/build/workbox.js deleted file mode 100644 index 3a7ba450a..000000000 --- a/vendor/twbs/bootstrap/build/workbox.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * Script to generate our docs service worker. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -'use strict' - -const fs = require('fs') -const path = require('path') -const swBuild = require('workbox-build') -const config = require('./workbox.config.json') - -const buildPrefix = '_gh_pages/' - -const workboxSWSrcPath = require.resolve('workbox-sw') -const wbFileName = path.basename(workboxSWSrcPath) -const workboxSWDestPath = `${buildPrefix}docs/4.1/assets/js/vendor/${wbFileName}` -const workboxSWSrcMapPath = `${workboxSWSrcPath}.map` -const workboxSWDestMapPath = `${workboxSWDestPath}.map` - -fs.createReadStream(workboxSWSrcPath).pipe(fs.createWriteStream(workboxSWDestPath)) -fs.createReadStream(workboxSWSrcMapPath).pipe(fs.createWriteStream(workboxSWDestMapPath)) - -const updateUrl = (manifestEntries) => { - const manifest = manifestEntries.map((entry) => { - if (entry.url.startsWith(buildPrefix)) { - const regex = new RegExp(buildPrefix, 'g') - entry.url = entry.url.replace(regex, '') - } - return entry - }) - return { - manifest, - warnings: [] - } -} - -config.manifestTransforms = [updateUrl] - -swBuild.injectManifest(config).then(({ - count, - size -}) => { - const wbSwRegex = /{fileName}/g - fs.readFile(config.swDest, 'utf8', (err, data) => { - if (err) { - throw err - } - const swFileContents = data.replace(wbSwRegex, wbFileName) - fs.writeFile(config.swDest, swFileContents, () => { - console.log(`Pre-cache Manifest generated. Pre-cached ${count} files, totalling ${size} bytes.`) - }) - }) -}).catch((error) => { - console.error(`Something went wrong: ${error}`) -}) |