Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WebpackAppConfig

example
var appConfig = {
    //path to directory that contains classic mmir directory structure
    resourcesPath: 'src/mmir',
    resourcesPathOptions: {
        //for included models, controllers, helpers: convert old-style
        // implementations by adding an export statement
        addModuleExport: true,
        //exlude model implementations, and do not include JSON grammar resources
        exclude: ['models', 'settings/grammar']
    },
    //utilize jQuery in mmir instead of (less backwards compatible)
    // alternative implementations (npm package jquery needs to be installed!)
    jquery: true,
    //specify language for runtime configuration (== configuration.json)
    configuration: {language: 'en'},
    //do include controller implementation found within resourcesPath
    // (NOTE: this is the default behavior)
    controllers: true,
    //do NOT include helper implemenations found within resourcesPath
    helpers: false,
    //...
}

Hierarchy

Index

Properties

Optional config

Configuration for mmir modules (analogous to requirejs' module config entries)

Optional configuration

configuration: RuntimeConfiguration

Specify additional (mmir) runtime configuration values, e.g. in addition to config/configuration.json.

In case of conflicts, these settings will override settings in config/configuration.json,

Optional controllers

controllers: ControllerOptions | boolean

Specify how (mmir) controller implementations should be parsed/included, and/or specify additional controllers that should be included.

If false, (mmir) controllers will be excluded/ignored.

Optional disableLogging

disableLogging: boolean

disable logging in mmir runtime: suppresses all logging-output by replacing mmirf/logger with an empty logger implementation

Optional fixWebpack4DefaultRulesForWASM

fixWebpack4DefaultRulesForWASM: boolean

HACK: webpack version 4 does include a default rule for loading WASM files that will cause errors due to the fact, that it will try to load mmir-integrated WASM files again.

Enabling this option will overwrite the webpackConfig.module.defaultRules option omitting the default rule for WASM files.

If you do not need the default rules, this can be enabled as a quick-fix for dealing with errors due to loading WASM files.

Optional grammars

grammars: GrammarOptions | boolean

Specify how (JSON) grammars should be parsed/included, and/or specify additional grammars that should be included.

Compiled grammars will be available via the SemanticInterpreter.

If false, grammars will be excluded/ignored.

Optional helpers

helpers: HelperOptions | boolean

Specify how (mmir) helper implementations (for mmir controllers) should be parsed/included, and/or specify additional helpers that should be included.

If false, helpers will be excluded/ignored.

Optional includeModules

includeModules: Array<ModuleId>

include a (optional) module, e.g. will be available via mmir.require().

The prefix "mmirf/" can be omitted.

example
includeModules: ['jsccGen', 'mmirf/jisonGen'],

Optional includePlugins

includePlugins: Array<PluginOptions>

Specify and configure mmir-plugins that should be included.

Optional jquery

jquery: boolean

If jquery is included: mmir will automatically use jquery utililities instead of alternative implementations.

NOTE: the jquery library must be loaded/included separately; this will only configure mmir to use jquery, but not include the library itself.

Optional loadAfterInit

loadAfterInit: Array<ModuleId>

include module AND do load it AFTER initializing the mmir library; the module will also be available via mmir.require().

The prefix "mmirf/" can be omitted.

example
loadAfterInit: ['mmirf/grammar/testing'],

Optional loadBeforeInit

loadBeforeInit: Array<ModuleId>

include module AND do load it BEFORE initializing the mmir library; the module will also be available via mmir.require().

The prefix "mmirf/" can be omitted.

example

loadBeforeInit: ['mmirf/polyfill'],

Optional models

models: ModelOptions | boolean

Specify how (mmir) data model implementations should be parsed/included, and/or specify additional data models that should be included.

If false, data models will be excluded/ignored.

Optional paths

specifying additional (or replacing) module paths

Optional resourcesPath

resourcesPath: string

specify the path to the MMIR resources directory with the default structure:

config/
      /languages/
                /<lang>/
                       /grammar.json
                       /dictionary.json
                       /speech.json
      /states/
             /input.xml
             /dialog.xml
      /configuration.json
controllers/*
helpers/*
models/*
views/*

The path will be used to collect all available resources and create the correspondig options for including them.

default

"www"

Optional resourcesPathOptions

resourcesPathOptions: ResourcesOptions

Optional rootPath

rootPath: string

used for resolving non-absolute paths: the absolute path to the app's root/sources directory (if omitted the current working directory is used for resolving non-absolute paths)

Optional runtimeSettings

runtimeSettings: {}

(for internal use: will be filled/set by compiler)

dictionary for mmir runtime settings:

  • "mmirf/settings/configuration": the (normalized/merged) RuntimeConfiguration for the mmir app (~ configuration.json)
  • "mmirf/settings/directories": the directories/files/URI information for loading/accessing speech-configuration, controllers, views etc. (~ directories.json)
  • "mmirf/settings/speech/{lang}": the speech (input/output) configuration for language code lang (~ lang/speech.json)
  • "mmirf/settings/dictionary/{lang}": the dictionary (internat. labels) for language code lang (~ lang/dictionary.json)
  • "mmirf/settings/grammar/{lang}": the JSON definition for the grammar of language code lang (~ lang/grammar.json)

Type declaration

  • [settingsId: string]: any

Optional settings

settings: SettingsOptions | boolean

Specify how (mmir) configuration and settings should be parsed/included, and/or specify additional settings that should be included.

The mmir configuration/settings are the resources that are by default located in the mmir config/ directory (with exception of the states sub-directory; for those instead use WebpackAppConfig.states):

config/
      /languages/
                /<lang>/
                       /grammar.json
                       /dictionary.json
                       /speech.json
      /states/
             /input.xml
             /dialog.xml
      /configuration.json

(NOTE the config/states/ sub-directory is handled/configured via the the states option)

Optional states

states: StateOptions | boolean

Specify how (SCXML) state-machines/-models should be parsed/included, and/or specify additional state-models that should be included.

If false, state-models will be excluded/ignored.

By default, if no state-models are include, "minimal" state-models for the InputManager and the DialogManager will be included, see mmir-tooling/defaultValues.

Optional views

views: ViewOptions | boolean

Specify how (mmir) views should be parsed/included, and/or specify additional views that should be included.

If false, views will be excluded/ignored.

Optional webpackPlugins

webpackPlugins: any[]

configuration for webpack plugins (for internal use)

Generated using TypeDoc