This repository was archived by the owner on May 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +38
-5
lines changed
packages/@vuetify/presets/generator/templates/base/src Expand file tree Collapse file tree 6 files changed +38
-5
lines changed Original file line number Diff line number Diff line change 66 */
77
88export 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 , / \. v u e $ / )
1114
1215 for ( const file of requireComponent . keys ( ) ) {
Original file line number Diff line number Diff line change 44 * Automatically included in `./src/main.js`
55 */
66
7+ // Imports
78import './app'
89import './webfontloader'
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import colors from 'vuetify/lib/util/colors'
1212Vue . use ( Vuetify )
1313
1414export default new Vuetify ( {
15+ // https://vuetifyjs.com/en/features/theme/#theme-generator
1516 theme : {
1617 themes : {
1718 light : {
Original file line number Diff line number Diff line change 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
38import pathify from 'vuex-pathify'
49
5- // options
10+ // Custom mapping style
11+ // https://davestewart.github.io/vuex-pathify/#/setup/mapping
612pathify . options . mapping = 'simple'
713pathify . options . strict = true
814
Original file line number Diff line number Diff line change 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)
1315export 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 ]
Original file line number Diff line number Diff line change 1+ /**
2+ * Vuetify Vue CLI Preset
3+ *
4+ * store/index.js
5+ *
6+ * vuex documentation: https://vuex.vuejs.org/
7+ */
8+
19// Vue
210import Vue from 'vue'
311import Vuex from 'vuex'
412
513// Utilities
14+ // https://davestewart.github.io/vuex-pathify/#/
615import pathify from '@/plugins/vuex-pathify'
716
817// Modules
18+ // https://vuex.vuejs.org/guide/modules.html
919import * as modules from './modules'
1020
1121Vue . 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
1830export const ROOT_DISPATCH = Object . freeze ( { root : true } )
You can’t perform that action at this time.
0 commit comments