Skip to content

Class: CssDocConfiguration ​

Defined in: packages/core/src/configuration.ts:106

Constructors ​

Constructor ​

ts
new CssDocConfiguration(): CssDocConfiguration;

Defined in: packages/core/src/configuration.ts:114

Returns ​

CssDocConfiguration

Properties ​

standardTagNames ​

ts
readonly static standardTagNames: readonly string[] = CSSDOC_TAG_NAMES;

Defined in: packages/core/src/configuration.ts:213

The names (without @) of every standard tag — the canonical vocabulary from @cssdoc/spec.

Accessors ​

globalPrecedence ​

Get Signature ​

ts
get globalPrecedence(): "base" | "global";

Defined in: packages/core/src/configuration.ts:142

Precedence when a base record and a @global record both define the same modifier name: "base" (explicit modifiers win; default) or "global" (the global one wins).

Returns ​

"base" | "global"


inlineComments ​

Get Signature ​

ts
get inlineComments(): InlineCommentMode;

Defined in: packages/core/src/configuration.ts:129

How inline /* … */ comments combine with tag prose (defaults to append).

Returns ​

InlineCommentMode


modifierConvention ​

Get Signature ​

ts
get modifierConvention(): ModifierConvention;

Defined in: packages/core/src/configuration.ts:119

The resolved modifier convention this configuration parses with (defaults to BEM).

Returns ​

ModifierConvention


supportedTagDefinitions ​

Get Signature ​

ts
get supportedTagDefinitions(): readonly CssDocTagDefinition[];

Defined in: packages/core/src/configuration.ts:157

Only the tag definitions that are currently supported.

Returns ​

readonly CssDocTagDefinition[]


tagDefinitions ​

Get Signature ​

ts
get tagDefinitions(): readonly CssDocTagDefinition[];

Defined in: packages/core/src/configuration.ts:152

Every registered tag definition, in registration order.

Returns ​

readonly CssDocTagDefinition[]

Methods ​

addTagDefinition() ​

ts
addTagDefinition(definition, supported?): void;

Defined in: packages/core/src/configuration.ts:167

Register a tag definition. Re-registering a tag name replaces the earlier definition.

Parameters ​

definition ​

CssDocTagDefinition

The tag to add.

supported? ​

boolean = true

Whether it is supported (defaults to true).

Returns ​

void


addTagDefinitions() ​

ts
addTagDefinitions(definitions, supported?): void;

Defined in: packages/core/src/configuration.ts:179

Register several tag definitions.

Parameters ​

definitions ​

readonly CssDocTagDefinition[]

supported? ​

boolean = true

Returns ​

void


isTagSupported() ​

ts
isTagSupported(definition): boolean;

Defined in: packages/core/src/configuration.ts:189

Whether a tag definition is supported.

Parameters ​

definition ​

CssDocTagDefinition

Returns ​

boolean


setGlobalPrecedence() ​

ts
setGlobalPrecedence(mode): void;

Defined in: packages/core/src/configuration.ts:147

Set the global-modifier precedence (see globalPrecedence).

Parameters ​

mode ​

"base" | "global"

Returns ​

void


setInlineComments() ​

ts
setInlineComments(mode): void;

Defined in: packages/core/src/configuration.ts:134

Set the inline-comment combine mode.

Parameters ​

mode ​

InlineCommentMode

Returns ​

void


setModifierConvention() ​

ts
setModifierConvention(input): void;

Defined in: packages/core/src/configuration.ts:124

Set the modifier convention from a preset name or a custom ModifierConvention.

Parameters ​

input ​

ModifierConventionInput

Returns ​

void


setNoStandardTags() ​

ts
setNoStandardTags(): void;

Defined in: packages/core/src/configuration.ts:205

Disable support for every standard tag (custom tags added later remain supported).

Returns ​

void


setSupportForTag() ​

ts
setSupportForTag(definition, supported): void;

Defined in: packages/core/src/configuration.ts:194

Enable or disable support for a tag.

Parameters ​

definition ​

CssDocTagDefinition

supported ​

boolean

Returns ​

void


setSupportForTags() ​

ts
setSupportForTags(definitions, supported): void;

Defined in: packages/core/src/configuration.ts:200

Enable or disable support for several tags.

Parameters ​

definitions ​

readonly CssDocTagDefinition[]

supported ​

boolean

Returns ​

void


tryGetTagDefinition() ​

ts
tryGetTagDefinition(tagName): CssDocTagDefinition | undefined;

Defined in: packages/core/src/configuration.ts:184

Look up a tag definition by name (with or without a leading @).

Parameters ​

tagName ​

string

Returns ​

CssDocTagDefinition | undefined


standardTags() ​

ts
static standardTags(): CssDocTagDefinition[];

Defined in: packages/core/src/configuration.ts:216

A fresh set of the standard tag definitions (new instances on each call), built from the spec.

Returns ​

CssDocTagDefinition[]

Released under the MIT License