Skip to content

Commit

Permalink
re-organize (default) exports
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Mar 16, 2022
1 parent de62191 commit 9398b82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
18 changes: 16 additions & 2 deletions javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
export * from './stimulus_reflex'

import StimulusReflex from './stimulus_reflex'
export default StimulusReflex
import * as StimulusReflex from './stimulus_reflex'
export default {
...StimulusReflex,
get debug () {
return Debug.value
},
set debug (value) {
Debug.set(!!value)
},
get deprecate () {
return Deprecate.value
},
set deprecate (value) {
Deprecate.set(!!value)
}
}
16 changes: 2 additions & 14 deletions javascript/stimulus_reflex.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,8 @@ document.addEventListener('cable-ready:after-inner-html', afterDOMUpdate)
document.addEventListener('cable-ready:after-morph', afterDOMUpdate)
window.addEventListener('load', setupDeclarativeReflexes)

export default {
export {
initialize,
register,
useReflex,
get debug () {
return Debug.value
},
set debug (value) {
Debug.set(!!value)
},
get deprecate () {
return Deprecate.value
},
set deprecate (value) {
Deprecate.set(!!value)
}
useReflex
}

0 comments on commit 9398b82

Please sign in to comment.