# Classes

DruxtClass

Druxt utility class.

# Typedefs

ModuleData : object
WrapperComponents : Array.<object>

# DruxtClass

Druxt utility class.

Kind: global class


# new DruxtClass()

Class constructor.

Example

import { DruxtClass } from 'druxt'
const druxt = new DruxtClass()
1
2

# .getComponents(vm, options, [all], [prefix]) ⇒ WrapperComponents

Get component data from available options.

Kind: instance method of DruxtClass

Param Type Default Description
vm object The DruxtJS module Vue.js component.
options Array.<string> The component naming options.
[all] boolean false Returns all options if true, else only globally registered options.
[prefix] string A string to prefix all components.

# .getModuleData() ⇒ ModuleData

Get the Druxt module data from the referenced component.

Kind: instance method of DruxtClass


# ModuleData : object

Kind: global typedef
Properties

Name Type Description
componentOptions Array.<Array.<string>> An array of arrays of strings for component naming.
propsData object Property data to bind to the wrapper component.

Example

{
  componentOptions: [['wrapper', 'component']],
  propsData: {},
}
1
2
3
4

# WrapperComponents : Array.<object>

Kind: global typedef
Properties

Name Type Description
global boolean Component global registration state.
kebab string The component name in kebab case.
parts Array.<string> The component naming parts.
pascal string The component name in pascal case.
prefix string The component name prefix.

Example

[{
  global: true,
  kebab: 'druxt-test-module-wrapper',
  parts: ['wrapper'],
  pascal: 'DruxtTestModuleWrapper',
  prefix: 'druxt-test-module',
}]
1
2
3
4
5
6
7