@component-controls/config
v4.0.3
Published
Component controls configuration reading utilities
Downloads
102
Readme
Table of contents
Overview
Configuration file utilities. Uses the glob package to locate story files from the configuration
Installation
This package is usually installed as part of the @component-controls package, but you can also install it standalone:
$ npm install @component-controls/config --save-dev
API
loadConfigurations
function
loads bot the build time and run time configurations
defined in @component-controls/config/core/config/src/index.ts
parameters
| Name | Type | Description |
| ----------- | ---------------- | --------------------------- |
| rootPath*
| string
| the roo path of the project |
| returns
| RunConfiguration | merged configuration |
extractDocuments
react component
Find the story files out of a configuration file using glob for the regex file search
defined in @component-controls/config/core/config/src/index.ts
properties
| Name | Type | Parent |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- |
| config*
| BuildConfiguration
webpack
: Configuration
| WebpackConfigFn
finalWebpack
: Configuration
| WebpackConfigFn
presets
: RuleType
[]configPath
: string
distFolder
: string
bundleName
: string
staticFolder
: string
cssFileName
: string
logOptions
: Partial
<LogOptions
>mode
: "none"
| "development"
| "production"
loaders
at
*: function (index
*: number
) => T
| undefined
module
: string
ident
: string
loader
: string
options
: string
| type
stories
: string
| string
[]files
: string
| string
[]siteRoot
: string
ignore
: string
[]pages
[string
]: categories
: DocType
[]siteMap
: type
| boolean
siteUrl
: string
instrument
: any
search
indexingModule
: string
searchingModule
*: string
fields
: SearchFields
[]emptySearchDocuments
: string
[]hitsPerPage
: number
options
: any
tokens
figmaAccessToken
: string
githubAccessToken
: string
component
: string
| Record
<string
, unknown
> | ElementType
<Props
>subcomponents
: Record
<string
, (string
, Record
<string
, unknown
>, ElementType
<Props
>)>controls
[string
]: ComponentControlText
| ComponentControlBoolean
| ComponentControlColor
| ComponentControlDate
| ComponentControlObject
<> | ComponentControlButton
<> | ComponentControlOptions
<> | ComponentControlNumber
| ComponentControlArray
| ComponentControlFiles
smartControls
smart
: boolean
include
: string
[] | IncludeFn
exclude
: string
[] | IncludeFn
decorators
: StoryRenderFn
[]plugins
: any
category
: string
| ConfigurationResult
|
| configPath*
| string
| ConfigurationResult
|
| optionsFilePath
| string
| ConfigurationResult
|
ConfigurationResult
interface
defined in @component-controls/config/core/config/src/index.ts
properties
| Name | Type |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| config*
| BuildConfiguration
webpack
: Configuration
| WebpackConfigFn
finalWebpack
: Configuration
| WebpackConfigFn
presets
: RuleType
[]configPath
: string
distFolder
: string
bundleName
: string
staticFolder
: string
cssFileName
: string
logOptions
: Partial
<LogOptions
>mode
: "none"
| "development"
| "production"
loaders
at
*: function (index
*: number
) => T
| undefined
module
: string
ident
: string
loader
: string
options
: string
| type
stories
: string
| string
[]files
: string
| string
[]siteRoot
: string
ignore
: string
[]pages
[string
]: categories
: DocType
[]siteMap
: type
| boolean
siteUrl
: string
instrument
: any
search
indexingModule
: string
searchingModule
*: string
fields
: SearchFields
[]emptySearchDocuments
: string
[]hitsPerPage
: number
options
: any
tokens
figmaAccessToken
: string
githubAccessToken
: string
component
: string
| Record
<string
, unknown
> | ElementType
<Props
>subcomponents
: Record
<string
, (string
, Record
<string
, unknown
>, ElementType
<Props
>)>controls
[string
]: ComponentControlText
| ComponentControlBoolean
| ComponentControlColor
| ComponentControlDate
| ComponentControlObject
<> | ComponentControlButton
<> | ComponentControlOptions
<> | ComponentControlNumber
| ComponentControlArray
| ComponentControlFiles
smartControls
smart
: boolean
include
: string
[] | IncludeFn
exclude
: string
[] | IncludeFn
decorators
: StoryRenderFn
[]plugins
: any
category
: string
|
| configPath*
| string
|
| optionsFilePath
| string
|