@whppt/layouts
v1.0.5
Published
Whppt layouts plugin.
Downloads
30
Readme
@whppt/layouts
A layout plugin for @whppt/nuxt. Implement configurable layouts in seconds.
Table of Contents
Features
Usage
- Add
@whppt/layouts
dependency to your project
yarn add @whppt/layouts # or npm install @whppt/layouts
- Add
@whppt/layouts
to themodules
section ofnuxt.config.js
{
modules: [
// Simple usage
'@whppt/layouts',
// With options
['@whppt/layouts', { /* module options */ }]
]
}
- create a nuxt plugin, eg.
~/plugins/layouts.js
import Vue from 'vue'
import layouts from '@whppt/layouts'
Vue.use(layouts)
- Make a few updates to your
~/nuxt.config.js
file.
export default {
/* Rest of your config */
plugins: {
'~/plugins/layouts.js',
/* Rest of your plugins */
},
/*
* Note: the transpile step is only required if using the Vue.use() method,
* if using Vue.component() to register the components omit the following.
*/
build: {
transpile: ['@whppt/layouts'],
},
}
- Check the documentation for any layout components you wish to use on how to register and initialise each component in whppt.