Skip to content

Interface: CompileCustomMediaOptions ​

Defined in: packages/core/src/compile.ts:35

Options for compileCustomMediaDeclarations.

Extends ​

Properties ​

configuration? ​

ts
configuration?: CssDocConfiguration;

Defined in: packages/core/src/model.ts:487

The tag configuration (standard + custom tags, and which are supported). Defaults to a fresh CssDocConfiguration with every standard tag enabled — i.e. the full built-in vocabulary. Supply one (e.g. from @cssdoc/config) to register custom tags or disable standard ones.

Inherited from ​

ParseOptions.configuration


fileName? ​

ts
fileName?: string;

Defined in: packages/core/src/model.ts:503

The source file name to record on each entry's CssSource, enabling source links. The parser always records line/column; supply this to also record the file.

Inherited from ​

ParseOptions.fileName


isRecordBoundary? ​

ts
isRecordBoundary?: (commentText) => string | undefined;

Defined in: packages/core/src/model.ts:481

How records are delimited. By default a new record begins at any doc comment (/** … */) that carries an @component or @name tag, which is the recommended, framework-agnostic convention. Supply a custom test to split on something else (e.g. a per-component header comment).

Parameters ​

commentText ​

string

Returns ​

string | undefined

Inherited from ​

ParseOptions.isRecordBoundary


modifierConvention? ​

ts
modifierConvention?: ModifierConventionInput;

Defined in: packages/core/src/model.ts:493

The modifier convention — how modifier classes are spelled (BEM .button--primary by default; rscss, bare, or a custom ModifierConvention for SUIT/CUBE/etc.). Overrides the configuration's convention when both are given.

Inherited from ​

ParseOptions.modifierConvention


parse? ​

ts
parse?: CssParse;

Defined in: packages/core/src/model.ts:498

The PostCSS parser to read css with. Defaults to postcss.parse (plain CSS). Inject a dialect parser (e.g. postcss-scss/postcss-less via @cssdoc/dialects) to document .scss/.less.

Inherited from ​

ParseOptions.parse


resolveValue? ​

ts
resolveValue?: (profile, refs) => string | boolean | undefined;

Defined in: packages/core/src/customMedia.ts:38

Resolve each profile's declaration value. Defaults to true.

Return a media query list string (for example (width >= 64rem)), true, or false.

Parameters ​

profile ​

string

refs ​

readonly StructureCustomMediaRef[]

Returns ​

string | boolean | undefined

Inherited from ​

BuildCustomMediaOptions.resolveValue


sort? ​

ts
sort?: boolean;

Defined in: packages/core/src/customMedia.ts:45

Sort declarations by profile name (default true) for stable output.

Inherited from ​

BuildCustomMediaOptions.sort

Released under the MIT License