diff options
author | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
commit | fe7ecede700fe04631d23f36473e697ce2b364dc (patch) | |
tree | e713fc39dba500a25cb2acf8561e286fb8b41ff0 /vendor/twbs/bootstrap/build/build-plugins.js | |
parent | 42de18d96d201d74e5df3ed1b8f6132cb00357b6 (diff) | |
parent | 089708ab9f90309a0c27ae633cf8f2604fce1170 (diff) | |
download | volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.gz volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.bz2 volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.zip |
Merge branch '6.4RC'6.4
Diffstat (limited to 'vendor/twbs/bootstrap/build/build-plugins.js')
-rw-r--r-- | vendor/twbs/bootstrap/build/build-plugins.js | 118 |
1 files changed, 55 insertions, 63 deletions
diff --git a/vendor/twbs/bootstrap/build/build-plugins.js b/vendor/twbs/bootstrap/build/build-plugins.js index 53093dc41..2e16e4f03 100644 --- a/vendor/twbs/bootstrap/build/build-plugins.js +++ b/vendor/twbs/bootstrap/build/build-plugins.js @@ -59,76 +59,67 @@ const defaultPluginConfig = { } const getConfigByPluginKey = pluginKey => { - if ( - pluginKey === 'Data' || - pluginKey === 'Manipulator' || - pluginKey === 'EventHandler' || - pluginKey === 'SelectorEngine' || - pluginKey === 'Util' || - pluginKey === 'Sanitizer' || - pluginKey === 'Backdrop' - ) { - return { - external: [] + 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 === 'Alert' || pluginKey === 'Tab' || pluginKey === 'Offcanvas') { - return defaultPluginConfig - } - 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 '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 === '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 - } + case 'Popover': + return { + external: [ + bsPlugins.Data, + bsPlugins.SelectorEngine, + bsPlugins.Tooltip + ], + globals: { + [bsPlugins.Data]: 'Data', + [bsPlugins.SelectorEngine]: 'SelectorEngine', + [bsPlugins.Tooltip]: 'Tooltip' + } + } - if (pluginKey === 'Popover') { - return { - external: [ - bsPlugins.Data, - bsPlugins.SelectorEngine, - bsPlugins.Tooltip - ], - globals: { - [bsPlugins.Data]: 'Data', - [bsPlugins.SelectorEngine]: 'SelectorEngine', - [bsPlugins.Tooltip]: 'Tooltip' + 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 === 'Toast') { - return { - external: [ - bsPlugins.Data, - bsPlugins.Base, - bsPlugins.EventHandler, - bsPlugins.Manipulator - ], - globals: { - [bsPlugins.Data]: 'Data', - [bsPlugins.Base]: 'Base', - [bsPlugins.EventHandler]: 'EventHandler', - [bsPlugins.Manipulator]: 'Manipulator' + default: + return { + external: [] } - } } } @@ -172,6 +163,7 @@ const build = async plugin => { name: plugin, sourcemap: true, globals, + generatedCode: 'es2015', file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`) }) |