diff options
author | Johann-S <johann.servoire@gmail.com> | 2019-03-01 12:11:41 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-03-11 18:59:08 +0300 |
commit | 2fd50f98a53874d89aa60c9a698464ce1a0b7bfc (patch) | |
tree | 198b94215d4cffce968b6c7b50f3d8855f5dc408 /js | |
parent | 3ffe3a5d82f6f561b82ff78d82b32a7d14aed558 (diff) |
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 0000000000..e49218a1e8 --- /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 0000000000..0a1d5ac0b4 --- /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 4d46d84b95..0000000000 --- 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 5597cd063c..ace578b316 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 783cc2ba05..4aa1dcde94 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/**' }) |