0.0.2 • Published 6 years ago

vue-cli-plugin-modular v0.0.2

Weekly downloads
37
License
MIT
Repository
github
Last release
6 years ago

vue-cli-plugin-modular

This is a vue-cli@3.0 plugin, allowing to create separate modules.

Quickstart

Install package in existing project with yarn or npm.

npm i -D vue-cli-plugin-modular
# or
yarn add vue-cli-plugin-modular -D

Invoke the plugin

vue invoke modular

Creating modules

Modules belong in the app folder and export a single json.

export default {
	router: {
		routes: [],    // routes to add to the router
		beforeEach: [] // guards for all routes in router
	},
	store: {
		modules: {},   // modules to add to vuex store
		plugins: []    // plugins to add to vuex store
	}
}

Modules only need to be added to src/app/index.js. The data is loaded by the router and the vuex store.