Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 9ea02e2

Browse files
committed
chore: normalize file doc intros and clean-up language
1 parent 5bb67e1 commit 9ea02e2

File tree

6 files changed

+38
-5
lines changed

6 files changed

+38
-5
lines changed

packages/@vuetify/presets/generator/templates/base/src/plugins/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
*/
77

88
export function registerComponents (app) {
9-
// Get all .vue files within `src/components/app`
9+
// Automatically get all .vue files within
10+
// `src/components` and register them to
11+
// the current app.
12+
// https://webpack.js.org/guides/dependency-management/#requirecontext
1013
const requireComponent = require.context('@/components', true, /\.vue$/)
1114

1215
for (const file of requireComponent.keys()) {

packages/@vuetify/presets/generator/templates/base/src/plugins/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
* Automatically included in `./src/main.js`
55
*/
66

7+
// Imports
78
import './app'
89
import './webfontloader'

packages/@vuetify/presets/generator/templates/base/src/plugins/vuetify.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import colors from 'vuetify/lib/util/colors'
1212
Vue.use(Vuetify)
1313

1414
export default new Vuetify({
15+
// https://vuetifyjs.com/en/features/theme/#theme-generator
1516
theme: {
1617
themes: {
1718
light: {

packages/@vuetify/presets/generator/templates/base/src/plugins/vuex-pathify.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
// https://davestewart.github.io/vuex-pathify/#/setup/config
1+
/**
2+
* plugins/vuex-pathify.js
3+
*
4+
* vuex-pathify documentation: https://davestewart.github.io/vuex-pathify/#/setup/config
5+
*/
26

7+
// Imports
38
import pathify from 'vuex-pathify'
49

5-
// options
10+
// Custom mapping style
11+
// https://davestewart.github.io/vuex-pathify/#/setup/mapping
612
pathify.options.mapping = 'simple'
713
pathify.options.strict = true
814

packages/@vuetify/presets/generator/templates/base/src/router/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* Vuetify Vue CLI Preset
3+
*
24
* router/index.js
35
*
46
* vue-router documentation: https://router.vuejs.org/
@@ -13,7 +15,7 @@ Vue.use(Router)
1315
export default new Router({
1416
mode: 'history',
1517
base: process.env.BASE_URL,
16-
scrollBehavior: (to, from, savedPosition) => {
18+
scrollBehavior: (to, _, savedPosition) => {
1719
if (to.hash) return { selector: to.hash }
1820
if (savedPosition) return savedPosition
1921

@@ -24,13 +26,21 @@ export default new Router({
2426
path: '/',
2527
// Layouts allow you to define different
2628
// structures for different view
29+
// https://router.vuejs.org/guide/essentials/nested-routes.html#nested-routes
2730
component: () => import('@/layouts/default'),
2831
children: [
2932
{
3033
path: '',
3134
name: 'Home',
3235
component: () => import('@/views/Home')
33-
}
36+
},
37+
// Create a new Vue template for an About page
38+
// and uncomment this entry to enable the route
39+
// {
40+
// path: 'about',
41+
// name: 'About',
42+
// component: () => import('@/views/About')
43+
// },
3444
]
3545
}
3646
]

packages/@vuetify/presets/generator/templates/base/src/store/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
/**
2+
* Vuetify Vue CLI Preset
3+
*
4+
* store/index.js
5+
*
6+
* vuex documentation: https://vuex.vuejs.org/
7+
*/
8+
19
// Vue
210
import Vue from 'vue'
311
import Vuex from 'vuex'
412

513
// Utilities
14+
// https://davestewart.github.io/vuex-pathify/#/
615
import pathify from '@/plugins/vuex-pathify'
716

817
// Modules
18+
// https://vuex.vuejs.org/guide/modules.html
919
import * as modules from './modules'
1020

1121
Vue.use(Vuex)
@@ -15,4 +25,6 @@ export default new Vuex.Store({
1525
plugins: [pathify.plugin]
1626
})
1727

28+
// A reusable const for making root commits and dispatches
29+
// https://vuex.vuejs.org/guide/modules.html#accessing-global-assets-in-namespaced-modules
1830
export const ROOT_DISPATCH = Object.freeze({ root: true })

0 commit comments

Comments
 (0)