Skip to content

Interface: CompileCustomMediaOptions

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

Options for compileCustomMediaDeclarations.

Extends

Properties

configuration?

ts
optional configuration?: CssDocConfiguration;

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

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
optional fileName?: string;

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

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
optional isRecordBoundary?: (commentText) => string | undefined;

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

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
optional modifierConvention?: ModifierConventionInput;

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

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
optional parse?: CssParse;

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

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
optional resolveValue?: (profile, refs) => string | boolean | undefined;

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

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
optional sort?: boolean;

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

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

Inherited from

BuildCustomMediaOptions.sort

Released under the MIT License