Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const _default

_default: { addCtrl: typeof addCtrl; addDictionary: typeof addDictionary; addGrammar: typeof addGrammar; addHelper: typeof addHelper; addJsonGrammar: typeof addJsonGrammar; addModel: typeof addModel; addSpeechConfig: typeof addSpeechConfig; addStateModel: typeof addStateModel; addStateModelXml: typeof addStateModelXml; addView: typeof addView; addViewTemplate: typeof addViewTemplate; createDirectoriesJson: typeof createDirectoriesJson; getLanguages: typeof getLanguages; setMode: (mode: "id" | "file") => void }

Type declaration

Const _default

_default: { applySetting: typeof applySetting }

Type declaration

Const _default

_default: { addPluginInfos: (pluginSettings: PluginOptions, appConfig: WebpackAppConfig, _directories: DirectoriesInfo, resourcesConfig: ResourceConfig, runtimeConfig: RuntimeConfiguration, settings: SettingsBuildEntry[]) => void; constainsPlugin: typeof constainsPlugin; normalizePluginEntry: typeof normalizePluginEntry; processDuplicates: typeof processDuplicates }

Type declaration

Const _default

_default: { mergeResourceConfigs: any; resourcePathsFrom: any }

Type declaration

  • mergeResourceConfigs: function
    • HELPER for merging the results of resourcePathsFrom() with the user-supplied AppConfig, without overwritting user-set options

      Parameters

      • userConfig: AppConfig

        the user-supplied AppConfig, into which the generatedConfig will be merged)

      • generatedConfig: AppConfig

        the generated AppConfig containing the path-field for discovered resources

      Returns AppConfig

      the merge AppConfig (same as userConfig)

  • resourcePathsFrom: function
    • [resourcePathsFrom description]

      Parameters

      • directory: string

        the directory that contains the default MMIR direcotry structure containing (possibly) config, languages, controllers, helpers etc.

      • parseOptions: ResourcesOptions

        options for parsing the directories: parseOptions.addModuleExport: {Boolean} use the addModuleExport option for controllers, helpers, and models parseOptions.exclude: {Array} exlude some resource types, like "controllers", or "models" for excluding sub-types for settings, e.g. dictionaries, use "settings/dictionary", or "settings/grammar" for excluding the sources of JSON grammars (i.e. exclude the sources for compiled grammars)

      Returns AppConfig

      the AppConfig with the 'path' option set for the corresponding resource type, so that the corresponding utils/loaders will the the resources from that path

Const _default

_default: { addSettingsToAppConfig: (settings: SettingsBuildEntry[], appConfig: BuildAppConfig | WebpackAppConfig, directories: DirectoriesInfo, _resources: ResourceConfig, runtimeConfig: RuntimeConfiguration, settingsOptions: SettingsOptions | SettingsBuildOptions | false, ignoreMissingDictionaries?: boolean) => void; applyDefaultOptions: (options: SettingsBuildOptions, settingsList: SettingsBuildEntry[]) => SettingsBuildEntry[]; configEntryAsyncExecGrammar: string; configEntryDisableGrammarStrictMode: string; configEntryIgnoreGrammar: string; createDefaultSettingsFor: typeof createDefaultSettingsFor; createSettingsEntryFor: typeof createSettingsEntryFor; getAllSpeechConfigsType: () => "speech-all"; getConfiguration: typeof getConfiguration; getFileType: typeof getFileType; getSettingsFor: typeof getSettings; isExcludeType: typeof isExclude; jsonSettingsFromDir: (options: SettingsOptions | SettingsBuildOptions | false, appRootDir: string, settingsList?: SettingsBuildEntry[]) => SettingsBuildEntry[]; loadSettingsFrom: typeof readSettingsFile; normalizeConfigurations: typeof normalizeConfigurations; setGrammarAsyncExec: (runtimeConfiguration: RuntimeConfiguration, grammarIdOrEntry: string | AsyncGramarExecEntry) => void; setGrammarIgnored: (runtimeConfiguration: RuntimeConfiguration, grammarId: string) => void }

Type declaration

Functions

addCtrl

addDictionary

addGrammar

addHelper

addJsonGrammar

addModel

addSpeechConfig

addStateModel

addStateModelXml

addView

addViewTemplate

applySetting

  • applySetting(field: string, opt: {}, globalOpt: {}, defaultValue?: any): void
  • HELPER: do set the field in options, if it is not explicitly specified, either to the globally specified value, or the default/fallback value for the field

    Parameters

    • field: string

      the field name for the option

    • opt: {}

      the element's options (e.g. GrammarOption)

      • [field: string]: any
    • globalOpt: {}

      the global options for that type of element (e.g. GrammarOptions)

      • [field: string]: any
    • Optional defaultValue: any

      the default value for the option/field (in case neither opt nor globalOpt for that field is defined)

    Returns void

constainsPlugin

  • check if plugin is already contained in pluginList

    NOTE: uses deep comparision, i.e. entries with same id (plugin.id) are considered deferent, if their (other) properties differ (even if the IDs match).

    Parameters

    • plugin: PluginOptions

      the plugin

    • pluginList: PluginOptions[] | null | undefined

      the list of plugins to check

    • deepComparison: boolean

      if true, makes deep comparision, instead of comparing the IDs

    Returns false | PluginOptions

    false if plugin is NOT contained in pluginList, otherwise the duplicate entry from pluginList

createBuildConfig

createDefaultSettingsFor

createDirectoriesJson

createResourcesConfig

  • createResourcesConfig(removePathsList?: string[], customPaths?: {}): ResourceConfig
  • create config for mmir resources:

    • paths: the mapping moduleID -> resourcePath (combined default mmir paths & removePathsList & customPaths)
    • workers: list of resourcePaths that are entry points for WebWorkers
    • fileResources: list of resourcePaths that refer to "raw"/binary files (e.g. mp3 audio, css stylesheets)
    • textResources: list of resourcePaths that refer to plain text files
    • resourcesPaths: mapping for resourcePaths {[sourcePath: string]: TargetPath}, i.e. specifies replacement of source-file by the traget-file

    Parameters

    • Optional removePathsList: string[]
    • Optional customPaths: {}
      • [id: string]: string

    Returns ResourceConfig

    the resource config object

createSettingsEntryFor

getConfiguration

getFileType

  • getFileType(filePath: string): "js" | "json"

getLanguages

getSettings

isExclude

isWebpackConfig

normalizeConfigurations

normalizePluginEntry

processDuplicates

readSettingsFile

  • readSettingsFile(filePath: string, fileType?: "json" | "js", async?: boolean): any
  • read settings file as JSON or "plain" CommonJS module and return PlainObject

    Parameters

    • filePath: string

      the filePath

    • Optional fileType: "json" | "js"
    • Optional async: boolean

    Returns any

    | Promise<{[field: string]: any}>} the settings object (or if async, a Promise that resolves to the settings object)

Generated using TypeDoc