Skip to content

Commit 20a9102

Browse files
committed
expose MatestackUiCore to the global js namespace
#343 (comment)
1 parent 80e54a8 commit 20a9102

File tree

9 files changed

+23
-18
lines changed

9 files changed

+23
-18
lines changed

app/javascript/matestack-ui-core/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ import matestackEventHub from '../../../app/concepts/matestack/ui/core/js/event-
77
import componentMixin from '../../../app/concepts/matestack/ui/core/component/component'
88
import matestackUiCore from '../../../app/concepts/matestack/ui/core/js/core'
99

10-
export {
10+
const MatestackUiCore = {
1111
Vue,
1212
Vuex,
1313
axios,
1414
matestackEventHub,
1515
componentMixin
1616
}
17+
18+
window.MatestackUiCore = MatestackUiCore
19+
20+
export default MatestackUiCore
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
require('../matestack-ui-core/index')
1+
require('../matestack-ui-core/index')
2+
module.exports = MatestackUiCore

builder/config/webpack/production.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const customConfig = {
77
output: {
88
filename: 'matestack-ui-core.min.js',
99
libraryTarget: 'var',
10-
library: 'MatestackUiCore',
11-
umdNamedDefine: false
10+
library: 'MatestackUiCore'
1211
}
1312
};
1413

vendor/assets/javascripts/dist/matestack-ui-core.js

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/assets/javascripts/dist/matestack-ui-core.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/assets/javascripts/dist/matestack-ui-core.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

vendor/assets/javascripts/dist/matestack-ui-core.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

0 commit comments

Comments
 (0)