Home Reference Source Repository

Function

Static Public Summary
public

gulpStylelint(options: Object): Stream

Stylelint results processor.

public

reporterFactory(config: Object, options: Object): Function

Creates a reporter from the given config.

public

writer(text: String, dest: String, destRoot: String): Promise

Creates the output folder and writes formatted text to a file.

Static Public

public gulpStylelint(options: Object): Stream source

import gulpStylelint from 'gulp-stylelint/src/index.js'

Stylelint results processor.

Params:

NameTypeAttributeDescription
options Object
  • optional

Plugin options.

options.reportOutputDir String
  • optional

Common path for all reporters.

options.reporters [Object]
  • optional

Reporter configurations.

options.debug Boolean
  • optional

If true, error stack will be printed.

Return:

Stream

Object stream usable in Gulp pipes.

public reporterFactory(config: Object, options: Object): Function source

import reporterFactory from 'gulp-stylelint/src/reporter-factory.js'

Creates a reporter from the given config.

Params:

NameTypeAttributeDescription
config Object
  • optional

Reporter config.

options Object
  • optional

Plugin options.

Return:

Function

Reporter.

public writer(text: String, dest: String, destRoot: String): Promise source

import writer from 'gulp-stylelint/src/writer.js'

Creates the output folder and writes formatted text to a file.

Params:

NameTypeAttributeDescription
text String

Text to write (may be color-coded).

dest String

Destination path relative to destRoot.

destRoot String
  • optional

Destination root folder, defaults to cwd.

Return:

Promise

Resolved when folder is created and file is written.