Skip to content

Commit 84c88eb

Browse files
committed
comment code
1 parent d8a4139 commit 84c88eb

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

client/src/app/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
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+
24
export { default as vuex } from './vuex'
5+
export { default as routes } from './routes'

client/src/app/routes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ import { routes as dashboard } from './dashboard'
22
import { routes as categories } from './categories'
33
import { 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.
57
export default [...login, ...dashboard, ...categories]

client/src/app/vuex.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
import { vuex as Categories } from './categories'
22

3+
// Shorthand for ‘Categories: Categories’
34
export default { Categories }

client/src/router/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { localStorageGetItem } from '../utils/local'
66

77
Vue.use(Router)
88

9+
// https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Operators/Spread_operator
910
const routes = [...app]
1011

1112
const router = new Router({

client/src/store/modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { vuex as modules } from '../app'
2-
2+
// create a new object and preserv original keys
33
export default { ...modules }

0 commit comments

Comments
 (0)