diff options
| author | Johann-S <[email protected]> | 2019-03-01 11:11:41 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-03-11 17:59:08 +0200 |
| commit | 2fd50f98a53874d89aa60c9a698464ce1a0b7bfc (patch) | |
| tree | 198b94215d4cffce968b6c7b50f3d8855f5dc408 /js | |
| parent | 3ffe3a5d82f6f561b82ff78d82b32a7d14aed558 (diff) | |
| download | bootstrap-2fd50f98a53874d89aa60c9a698464ce1a0b7bfc.tar.xz bootstrap-2fd50f98a53874d89aa60c9a698464ce1a0b7bfc.zip | |
build bootstrap in esm
Diffstat (limited to 'js')
| -rw-r--r-- | js/index.esm.js | 32 | ||||
| -rw-r--r-- | js/index.umd.js | 32 | ||||
| -rw-r--r-- | js/src/index.js | 32 | ||||
| -rw-r--r-- | js/tests/integration/bundle.js | 6 | ||||
| -rw-r--r-- | js/tests/integration/rollup.bundle.js | 2 |
5 files changed, 68 insertions, 36 deletions
diff --git a/js/index.esm.js b/js/index.esm.js new file mode 100644 index 000000000..e49218a1e --- /dev/null +++ b/js/index.esm.js @@ -0,0 +1,32 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.3.1): index.esm.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +import Alert from './src/alert' +import Button from './src/button' +import Carousel from './src/carousel' +import Collapse from './src/collapse' +import Dropdown from './src/dropdown' +import Modal from './src/modal' +import Popover from './src/popover' +import ScrollSpy from './src/scrollspy' +import Tab from './src/tab' +import Toast from './src/toast' +import Tooltip from './src/tooltip' + +export { + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Popover, + ScrollSpy, + Tab, + Toast, + Tooltip +} diff --git a/js/index.umd.js b/js/index.umd.js new file mode 100644 index 000000000..0a1d5ac0b --- /dev/null +++ b/js/index.umd.js @@ -0,0 +1,32 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.3.1): index.umd.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +import Alert from './src/alert' +import Button from './src/button' +import Carousel from './src/carousel' +import Collapse from './src/collapse' +import Dropdown from './src/dropdown' +import Modal from './src/modal' +import Popover from './src/popover' +import ScrollSpy from './src/scrollspy' +import Tab from './src/tab' +import Toast from './src/toast' +import Tooltip from './src/tooltip' + +export default { + Alert, + Button, + Carousel, + Collapse, + Dropdown, + Modal, + Popover, + ScrollSpy, + Tab, + Toast, + Tooltip +} diff --git a/js/src/index.js b/js/src/index.js deleted file mode 100644 index 4d46d84b9..000000000 --- a/js/src/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * -------------------------------------------------------------------------- - * Bootstrap (v4.3.1): index.js - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * -------------------------------------------------------------------------- - */ - -import Alert from './alert' -import Button from './button' -import Carousel from './carousel' -import Collapse from './collapse' -import Dropdown from './dropdown' -import Modal from './modal' -import Popover from './popover' -import ScrollSpy from './scrollspy' -import Tab from './tab' -import Toast from './toast' -import Tooltip from './tooltip' - -export { - Alert, - Button, - Carousel, - Collapse, - Dropdown, - Modal, - Popover, - ScrollSpy, - Tab, - Toast, - Tooltip -} diff --git a/js/tests/integration/bundle.js b/js/tests/integration/bundle.js index 5597cd063..ace578b31 100644 --- a/js/tests/integration/bundle.js +++ b/js/tests/integration/bundle.js @@ -1,7 +1,9 @@ import 'popper.js' -import bootstrap from '../../../dist/js/bootstrap' +import { + Tooltip +} from '../../../dist/js/bootstrap.esm.js' window.addEventListener('load', () => { [...document.querySelectorAll('[data-toggle="tooltip"]')] - .map(tooltipNode => new bootstrap.Tooltip(tooltipNode)) + .map(tooltipNode => new Tooltip(tooltipNode)) }) diff --git a/js/tests/integration/rollup.bundle.js b/js/tests/integration/rollup.bundle.js index 783cc2ba0..4aa1dcde9 100644 --- a/js/tests/integration/rollup.bundle.js +++ b/js/tests/integration/rollup.bundle.js @@ -1,7 +1,6 @@ /* eslint-env node */ const resolve = require('rollup-plugin-node-resolve') -const commonjs = require('rollup-plugin-commonjs') const babel = require('rollup-plugin-babel') module.exports = { @@ -12,7 +11,6 @@ module.exports = { }, plugins: [ resolve(), - commonjs(), babel({ exclude: 'node_modules/**' }) |
