aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/build/build-plugins.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/build/build-plugins.js')
-rw-r--r--vendor/twbs/bootstrap/build/build-plugins.js117
1 files changed, 63 insertions, 54 deletions
diff --git a/vendor/twbs/bootstrap/build/build-plugins.js b/vendor/twbs/bootstrap/build/build-plugins.js
index 15a537845..53093dc41 100644
--- a/vendor/twbs/bootstrap/build/build-plugins.js
+++ b/vendor/twbs/bootstrap/build/build-plugins.js
@@ -59,67 +59,76 @@ const defaultPluginConfig = {
}
const getConfigByPluginKey = pluginKey => {
- switch (pluginKey) {
- case 'Alert':
- case 'Offcanvas':
- case 'Tab':
- return defaultPluginConfig
-
- case 'Base':
- case 'Button':
- case 'Carousel':
- case 'Collapse':
- case 'Modal':
- case 'ScrollSpy': {
- const config = Object.assign(defaultPluginConfig)
- config.external.push(bsPlugins.Manipulator)
- config.globals[bsPlugins.Manipulator] = 'Manipulator'
- return config
+ if (
+ pluginKey === 'Data' ||
+ pluginKey === 'Manipulator' ||
+ pluginKey === 'EventHandler' ||
+ pluginKey === 'SelectorEngine' ||
+ pluginKey === 'Util' ||
+ pluginKey === 'Sanitizer' ||
+ pluginKey === 'Backdrop'
+ ) {
+ return {
+ external: []
}
+ }
- case 'Dropdown':
- case 'Tooltip': {
- const config = Object.assign(defaultPluginConfig)
- config.external.push(bsPlugins.Manipulator, '@popperjs/core')
- config.globals[bsPlugins.Manipulator] = 'Manipulator'
- config.globals['@popperjs/core'] = 'Popper'
- return config
- }
+ if (pluginKey === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') {
+ return defaultPluginConfig
+ }
- case 'Popover':
- return {
- external: [
- bsPlugins.Data,
- bsPlugins.SelectorEngine,
- bsPlugins.Tooltip
- ],
- globals: {
- [bsPlugins.Data]: 'Data',
- [bsPlugins.SelectorEngine]: 'SelectorEngine',
- [bsPlugins.Tooltip]: 'Tooltip'
- }
- }
+ if (
+ pluginKey === 'Base' ||
+ pluginKey === 'Button' ||
+ pluginKey === 'Carousel' ||
+ pluginKey === 'Collapse' ||
+ pluginKey === 'Modal' ||
+ pluginKey === 'ScrollSpy'
+ ) {
+ const config = Object.assign(defaultPluginConfig)
+ config.external.push(bsPlugins.Manipulator)
+ config.globals[bsPlugins.Manipulator] = 'Manipulator'
+ return config
+ }
- case 'Toast':
- return {
- external: [
- bsPlugins.Data,
- bsPlugins.Base,
- bsPlugins.EventHandler,
- bsPlugins.Manipulator
- ],
- globals: {
- [bsPlugins.Data]: 'Data',
- [bsPlugins.Base]: 'Base',
- [bsPlugins.EventHandler]: 'EventHandler',
- [bsPlugins.Manipulator]: 'Manipulator'
- }
+ if (pluginKey === 'Dropdown' || pluginKey === 'Tooltip') {
+ const config = Object.assign(defaultPluginConfig)
+ config.external.push(bsPlugins.Manipulator, '@popperjs/core')
+ config.globals[bsPlugins.Manipulator] = 'Manipulator'
+ config.globals['@popperjs/core'] = 'Popper'
+ return config
+ }
+
+ if (pluginKey === 'Popover') {
+ return {
+ external: [
+ bsPlugins.Data,
+ bsPlugins.SelectorEngine,
+ bsPlugins.Tooltip
+ ],
+ globals: {
+ [bsPlugins.Data]: 'Data',
+ [bsPlugins.SelectorEngine]: 'SelectorEngine',
+ [bsPlugins.Tooltip]: 'Tooltip'
}
+ }
+ }
- default:
- return {
- external: []
+ if (pluginKey === 'Toast') {
+ return {
+ external: [
+ bsPlugins.Data,
+ bsPlugins.Base,
+ bsPlugins.EventHandler,
+ bsPlugins.Manipulator
+ ],
+ globals: {
+ [bsPlugins.Data]: 'Data',
+ [bsPlugins.Base]: 'Base',
+ [bsPlugins.EventHandler]: 'EventHandler',
+ [bsPlugins.Manipulator]: 'Manipulator'
}
+ }
}
}