mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
add modularity integration test
This commit is contained in:
parent
3d12b541c4
commit
e1b82f51e2
7
js/tests/integration/bundle-modularity.js
Normal file
7
js/tests/integration/bundle-modularity.js
Normal file
@ -0,0 +1,7 @@
|
||||
import 'popper.js'
|
||||
import Tooltip from '../../dist/tooltip'
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
[...document.querySelectorAll('[data-toggle="tooltip"]')]
|
||||
.map(tooltipNode => new Tooltip(tooltipNode))
|
||||
})
|
17
js/tests/integration/rollup.bundle-modularity.js
Normal file
17
js/tests/integration/rollup.bundle-modularity.js
Normal file
@ -0,0 +1,17 @@
|
||||
/* eslint-env node */
|
||||
|
||||
const commonjs = require('rollup-plugin-commonjs')
|
||||
const configRollup = require('./rollup.bundle')
|
||||
|
||||
const config = {
|
||||
...configRollup,
|
||||
input: 'js/tests/integration/bundle-modularity.js',
|
||||
output: {
|
||||
file: 'js/coverage/bundle-modularity.js',
|
||||
format: 'iife'
|
||||
}
|
||||
}
|
||||
|
||||
config.plugins.unshift(commonjs())
|
||||
|
||||
module.exports = config
|
37
package-lock.json
generated
37
package-lock.json
generated
@ -6151,6 +6151,15 @@
|
||||
"integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=",
|
||||
"dev": true
|
||||
},
|
||||
"is-reference": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
|
||||
"integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/estree": "0.0.39"
|
||||
}
|
||||
},
|
||||
"is-regex": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
|
||||
@ -7142,6 +7151,15 @@
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.25.4",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz",
|
||||
"integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.4"
|
||||
}
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
|
||||
@ -9867,6 +9885,19 @@
|
||||
"rollup-pluginutils": "^2.8.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-commonjs": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz",
|
||||
"integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estree-walker": "^0.6.1",
|
||||
"is-reference": "^1.1.2",
|
||||
"magic-string": "^0.25.2",
|
||||
"resolve": "^1.11.0",
|
||||
"rollup-pluginutils": "^2.8.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-istanbul": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-istanbul/-/rollup-plugin-istanbul-2.0.1.tgz",
|
||||
@ -10729,6 +10760,12 @@
|
||||
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
|
||||
"dev": true
|
||||
},
|
||||
"sourcemap-codec": {
|
||||
"version": "1.4.6",
|
||||
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
|
||||
"integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==",
|
||||
"dev": true
|
||||
},
|
||||
"spdx-correct": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
|
||||
|
@ -44,7 +44,7 @@
|
||||
"js-test": "npm-run-all --parallel js-test-karma js-test-integration",
|
||||
"js-debug": "cross-env DEBUG=true karma start js/tests/karma.conf.js",
|
||||
"js-test-karma": "karma start js/tests/karma.conf.js",
|
||||
"js-test-integration": "rollup --config js/tests/integration/rollup.bundle.js",
|
||||
"js-test-integration": "rollup --config js/tests/integration/rollup.bundle.js && rollup --config js/tests/integration/rollup.bundle-modularity.js",
|
||||
"js-test-cloud": "cross-env BROWSER=true npm run js-test-karma",
|
||||
"lint": "npm-run-all --parallel js-lint css-lint",
|
||||
"docs": "npm-run-all docs-build docs-lint",
|
||||
@ -125,6 +125,7 @@
|
||||
"postcss-cli": "^6.1.3",
|
||||
"rollup": "^1.21.4",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-istanbul": "^2.0.1",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"serve": "^11.1.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user