Skip to content

Function: createIndex() ​

ts
function createIndex(css, options?): CssDocIndex;

Defined in: packages/index/src/index.ts:527

Build an index from CSS, with source spans. Parses the model via @cssdoc/core, then makes a second PostCSS pass to locate each record and member.

Parameters ​

css ​

string

The CSS source.

options? ​

file (attached to locations) and configuration (custom tags).

configuration? ​

CssDocConfiguration

file? ​

string

modifierConvention? ​

ModifierConventionInput

parse? ​

(css) => Root_

The PostCSS parser (inject a dialect parser for .scss/.less; default postcss.parse).

Returns ​

CssDocIndex

The index.

Released under the MIT License