Blue core

The /src/core folder holds most of the logic behind the actual project, like: languages, routing, vuex and utils.

bootstrap

Is the entry point of the Blue project: here usually all new plugins or environmental configurations are handled.

i18n

All languages are handled here, from translations to url prefixing. Please check the vue-i18n-manager documentation to be able to change your i18n configurations.

router

Creates the VueRouter instance connected with the languages and synced with the vuex store.
Usually this file doesn't need to be modified.

All routes are listed in the routes.js file in the root of the /app folder.

vuex

This is the vuex manager file, all store modules added in src/app/data/store folder are automatically registered in the application, so this file doesn't need to be modified: only if a new plugin needs to be added.

utils

This is a collection of utilities available across the application

mapComponets

Returns a map of all matching components file name

import { mapComponents } from 'core/utils'

export default {
  name: 'my-component',

  components: {
    ...mapComponents([
      'my-component',
      'my-awesome-component',
      'another-component'
    ])
  }
}

The mapComponents method finds, imports and names all components for you directly.

connectComponent

Returns a connected component to the Vuex store

import { connectComponent } from 'core/utils'

export default {
  name: 'my-component',

  components: {
    myComponent: connectComponent('my-component', {
      gettersToProps: {
        items: 'articles' // getter in the store
      }
    })
  }
}

pageLoader

It returns a resolved page component instance. The loaded page will be then compiled as a separate chunk file to decrease the size of the main bundle.

// src/app/routes.js

import { pageLoader } from 'core/utils'

export default [
  {
    name: 'home',
    path: '/',
    component: pageLoader('home')
  }
]

results matching ""

    No results matching ""