Skip to content

Drupal Content Entity schema generator for Druxt with support for View and Form displays.

DruxtSchemaNuxtModule

View source on GitHub

DruxtSchemaNuxtModule(moduleOptions)

The Nuxt.js module function.

  • Adds the Schema plugin to Nuxt.js.
  • Adds the Schema Vuex store to Nuxt.js.
  • Builds the Schema data via the builder:prepared hook.
  • With druxt.schema.refresh, regenerates schemas on the server after each cache clear, or on each request under nuxt dev.

The module function should not be used directly, but rather installed via your Nuxt.js configuration file.

A Nuxt module configures the Nuxt application, and is unrelated to a Drupal module.

Options are set on the root level druxt Nuxt.js config object.

Kind: global function
See

ParamTypeDescription
moduleOptionsobjectNuxt.js module options object.

Example

// `nuxt.config.js`
module.exports = {
  modules: [
    'druxt-schema'
  ],
  druxt: {
    baseUrl: 'https://example.com'
  }
}