File tree Expand file tree Collapse file tree 5 files changed +9
-2
lines changed
Expand file tree Collapse file tree 5 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1- export { default as routes } from './routes'
1+ // Centralizes loading of vuex modules and routes
2+ // In this way, the maintenance of the application modules becomes simpler
3+
24export { default as vuex } from './vuex'
5+ export { default as routes } from './routes'
Original file line number Diff line number Diff line change @@ -2,4 +2,6 @@ import { routes as dashboard } from './dashboard'
22import { routes as categories } from './categories'
33import { routes as login } from './login'
44
5+ // https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Operators/Spread_operator
6+ // Thus a new array is created, containing all objects that match the routes.
57export default [ ...login , ...dashboard , ...categories ]
Original file line number Diff line number Diff line change 11import { vuex as Categories } from './categories'
22
3+ // Shorthand for ‘Categories: Categories’
34export default { Categories }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { localStorageGetItem } from '../utils/local'
66
77Vue . use ( Router )
88
9+ // https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Operators/Spread_operator
910const routes = [ ...app ]
1011
1112const router = new Router ( {
Original file line number Diff line number Diff line change 11import { vuex as modules } from '../app'
2-
2+ // create a new object and preserv original keys
33export default { ...modules }
You can’t perform that action at this time.
0 commit comments