New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: client store code style #3683
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #3683 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 18 18
Lines 1232 1232
Branches 337 337
=======================================
Hits 1201 1201
Misses 30 30
Partials 1 1 Continue to review full report at Codecov.
|
@manniL some conflicts to fix -- is there much left to do on this? |
@galvez Haven't accomplished that much by now as I started digging into VueX HMR recently. |
@manniL @clarkdo I fixed conflcits and added the store directory to the restart watcher, I think it's the most sensible thing to do to enhance DX here. The issue of the CLI test remains though, we need to find a way to properly check for the interactive log in |
I think that's not it. I think the request was to HMR modules directly (not the whole page when they change 🤔). However, it's a great step in the correct direction |
lib/app/store.js
Outdated
storeData.modules = {} | ||
} | ||
// Recursive find files in {srcDir}/{dir.store} | ||
files = require.context('@/<%= dir.store %>', true, /^\.\/(?!<%= ignorePrefix %>)[^.]+\.(<%= extensions %>)$/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you prefer an "external variable" instead of a const
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manniL store
needed to be available in L130
lib/app/store.js
Outdated
// Recursive find files in {srcDir}/{dir.store} | ||
const files = require.context('@/<%= dir.store %>', true, /^\.\/(?!<%= ignorePrefix %>)[^.]+\.(<%= extensions %>)$/) | ||
const filenames = files.keys() | ||
|
||
// Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could actually remove that comment as it doesn't add any value, right?
lib/app/store.js
Outdated
// createStore | ||
let store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you prefer an "external variable" instead of a const
(or an inline return if it doesn't add any value) here?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
related: #325