cerebral-modules
Create cerebral modules that can be reused, shared, imported or just simply keep your app tidy.
Creating a module
A module needs to export the following:
export default {
name: 'uniqueModuleName',
isService: false,
chains: {
init: []
},
Component: ModuleIndexComponent
}
Loading modules
From your main.js
import controller from './controller';
import external form 'external-node-module';
import home from './modules/home';
import notFound from './modules/notFound';
import setupModules from 'cerebral-modules';
const chains = setupModules(controller, [ external, home, notFound ]);
Contribute
Fork repo
npm install
npm run dev
runs dev mode which watches for changes and auto lints, tests and buildsnpm test
runs the testsnpm run lint
lints the codenpm run build
compiles es6 to es5