@borngroup/lightswitch-nuxt-theme

Lightswitch core project - default nuxt project theme
2,248
Install
npm install @borngroup/lightswitch-nuxt-theme
Latest Version:0.1.78
Vue:2
License:MIT
Last Updated:Nov 11, 2021
Links: npm
Maintainer: marcgreenfield-born

Nuxt Theme Module

This module is basically our default theme on steroids. It contains additional utilities that make it easier to work with the theme (in projects and as core developers) and allows to disable parts of its features:

  • By default, it adds eCommerce routes to your app.
  • If you set generate in the config, it will copy, merge & watch for changes in agnostic and integration theme.

How to install

Add dependency:

yarn add @borngroup/lightswitch-nuxt-theme

Add it to buildModules in your nuxt.config.js:

['@borngroup/lightswitch-nuxt-theme'],

Configuration details

routes

If you want to disable autoadding routes you can do it:

['@borngroup/lightswitch-nuxt-theme', {
    routes: false
}],

generate

To properly configure generate property you have to provide data that will be replaced in EJS templates. This property applies only to the core development:

['@borngroup/lightswitch-nuxt-theme', {
    generate: {
        replace: {
            apiClient: '@borngroup/lightswitch-commercetools-api',
            composables: '@lightswitch/commercetools'
        }
    }
}],

Example EJS template where it will be pasted:

import { useCategory } from '<%= options.generate.replace.composables %>';

If you want to change the target directory where agnostic and integration themes will be merged and copied during core development change the generate.path property (default: _theme):

['@borngroup/lightswitch-nuxt-theme', {
    generate: {
        path: '.custom-dir'
    }
}],

Related Packages

@borngroup/lightswitch-core

Lightswitch Core package that provides the project packages the core nuxt featur...

1,571

Version History

Version Released Vue License
0.1.78 ^2.6.13 MIT
0.1.77 ^2.6.13 MIT
0.1.76 ^2.6.13 MIT
0.1.75 ^2.6.13 MIT
0.1.74 ^2.6.13 MIT