Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Tapable
    • CssBlocksPlugin

Implements

  • Plugin

Index

Constructors

constructor

Properties

analyzer

analyzer: Analyzer

compilationOptions

compilationOptions: CSSBlocksOptions

debug

debug: debugGenerator.IDebugger

name

name: string

optimizationOptions

optimizationOptions: OptiCSSOptions

outputCssFile

outputCssFile: string

Optional pendingResult

pendingResult: PendingResult

projectDir

projectDir: string

Methods

apply

  • apply(compiler: WebpackCompiler): void

applyPlugins

  • applyPlugins(name: string, ...args: any[]): void
  • synchronously applies all registered handlers for target name(event id).

    The handlers are called with all the rest arguments.

    Parameters

    • name: string

      plugin group name

    • Rest ...args: any[]

    Returns void

applyPlugins0

  • applyPlugins0(name: string): void
  • Parameters

    • name: string

    Returns void

applyPlugins1

  • applyPlugins1(name: string, param: any): void
  • Parameters

    • name: string
    • param: any

    Returns void

applyPlugins2

  • applyPlugins2(name: string, param1: any, param2: any): void
  • Parameters

    • name: string
    • param1: any
    • param2: any

    Returns void

applyPluginsAsync

  • applyPluginsAsync(name: string, ...args: any[]): void
  • asynchronously applies all registered handlers for target name(event id).

    The handlers are called with all the rest arguments and a callback function with the signature (err: Error) => void.

    The handlers are called in series, one at a time. After all handlers are applied, callback is called.

    If any handler invokes the (anonymous)callback with error, no more handlers will be called and the real callback is call with that error.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns void

applyPluginsAsyncSeries

  • applyPluginsAsyncSeries(name: string, ...args: any[]): void
  • same as applyPluginsAsync

    see

    applyPluginsAsync

    alias

    Tapable.applyPluginsAsync

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns void

applyPluginsAsyncSeries1

  • applyPluginsAsyncSeries1(name: string, param: any, callback: CallbackFunction): void
  • Parameters

    • name: string
    • param: any
    • callback: CallbackFunction

    Returns void

applyPluginsAsyncSeriesBailResult

  • applyPluginsAsyncSeriesBailResult(name: string, ...args: any[]): void
  • asynchronously applies all registered handlers for target name(event id).

    The handlers are called with all the rest arguments and a callback function with the signature (...params) => void.

    Handlers must invoke the (anonymous)callback, otherwise the series is cut down and real callback won't be invoked.

    The order is defined by registration order not by speed of the handler function.

    If a handler returns something !== undefined, that value is returned and no more handlers will be applied.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns void

applyPluginsAsyncSeriesBailResult1

  • applyPluginsAsyncSeriesBailResult1(name: string, param: any, callback: CallbackFunction): void
  • asynchronously applies all registered handlers for target name(event id).

    see

    applyPluginsAsyncSeriesBailResult

    Note: the fundamental difference with <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsasyncseriesbailresult">applyPluginsAsyncSeriesBailResult</a>, is that, <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsasyncseriesbailresult">applyPluginsAsyncSeriesBailResult</a> passes the arguments as arguments list for plugins while <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsasyncseriesbailresult1">applyPluginsAsyncSeriesBailResult1</a> passes the arguments as single param(any type) and a callback for plugins

    Parameters

    • name: string
    • param: any
    • callback: CallbackFunction

    Returns void

applyPluginsAsyncWaterfall

  • applyPluginsAsyncWaterfall(name: string, init: any, callback: CallbackFunction): void
  • Asynchronously applies all registered handlers for target name(event id).

    The handlers are called with the current value and a callback function with the signature (err: Error, nextValue: any) => void.

    init is used for the first handler. The rest handles are called with the value which previous handler uses to invoke the (anonymous)callback invoked

    After all handlers are applied, callback is called with the last value.

    If any handler invokes the (anonymous)callback with error, no more handlers will be called and the real callback is call with that error.

    Parameters

    • name: string
    • init: any
    • callback: CallbackFunction

    Returns void

applyPluginsBailResult

  • applyPluginsBailResult(name: string, ...args: any[]): any
  • synchronously applies all registered handlers for target name(event id).

    The handlers are called with all the rest arguments.

    If a handler returns something !== undefined, that value is returned and no more handlers will be applied.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns any

applyPluginsBailResult1

  • applyPluginsBailResult1(name: string, param: any): any
  • synchronously applies all registered handlers for target name(event id).

    The handlers are called with target param

    If a handler returns something !== undefined, the value is returned and no more handlers are applied.

    Note: the fundamental difference with <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsbailresult">applyPluginsBailResult</a>, is that, <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsbailresult">applyPluginsBailResult</a> passes the arguments as arguments list for plugins while <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsbailresult1">applyPluginsBailResult1</a> passes the arguments as single param(any type) for plugins

    Parameters

    • name: string
    • param: any

    Returns any

applyPluginsParallel

  • applyPluginsParallel(name: string, ...args: any[]): void
  • applies all registered handlers for target name(event id) in parallel.

    The handlers are called with all the rest arguments and a callback function with the signature (err?: Error) => void.

    The callback function is called when all handlers call the callback without err.

    If any handler invokes the callback with err, callback is invoked with this error and the other handlers are skipped.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns void

applyPluginsParallelBailResult

  • applyPluginsParallelBailResult(name: string, ...args: any[]): void
  • applies all registered handlers for target name(event id) in parallel.

    The handlers are called with all the rest arguments and a callback function with the signature (currentResult?: []) => void.

    Handlers must call the callback.

    The first result (either error or value) with is not undefined is passed to the callback.

    The order is defined by registration not by speed of the handler function.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns void

applyPluginsParallelBailResult1

  • applyPluginsParallelBailResult1(name: string, param: any, callback: CallbackFunction): void
  • applies all registered handlers for target name(event id) in parallel.

    see

    applyPluginsParallelBailResult

    Note: the fundamental difference with <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsparallelbailresult">applyPluginsParallelBailResult</a>, is that, <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsparallelbailresult">applyPluginsParallelBailResult</a> passes the arguments as arguments list for plugins while <a href="_css_blocks_webpack.cssblocksplugin.html#applypluginsparallelbailresult1">applyPluginsParallelBailResult1</a> passes the arguments as single param(any type) and a callback for plugins

    Parameters

    • name: string
    • param: any
    • callback: CallbackFunction

    Returns void

applyPluginsWaterfall

  • applyPluginsWaterfall(name: string, init: any, ...args: any[]): any
  • synchronously applies all registered handlers for target name(event id).

    The handlers are called with the return value of the previous handler and all the rest arguments.

    init is used for the first handler.

    return the returned value of the last handler

    Parameters

    • name: string
    • init: any
    • Rest ...args: any[]

    Returns any

applyPluginsWaterfall0

  • applyPluginsWaterfall0(name: string, init: any): any
  • synchronously applies all registered handlers for target name(event id).

    The handlers are called ONLY with the return value of the previous handler.

    init is used for the first handler.

    return the returned value of the last handler

    Parameters

    • name: string
    • init: any

    Returns any

Private compileBlocks

  • compileBlocks(analyzer: Analyzer, cssOutputName: string): Promise<CompilationResult>

Private handleMake

  • handleMake(outputPath: string, assets: Assets, compilation: WebpackAny, cb: function): Promise<void>

Private notifyCompilationExpiration

  • notifyCompilationExpiration(): void

Private notifyComplete

Private notifyPendingCompilation

onCompilationExpiration

  • onCompilationExpiration(handler: function): void
  • Fires when the compilation is first started to let any listeners know that their current promise is no longer valid.

    Parameters

    • handler: function
        • (): void
        • Returns void

    Returns void

onComplete

  • onComplete(handler: function): void

onPendingCompilation

  • onPendingCompilation(handler: function): void

plugin

  • plugin(names: string, handler: function): void
  • plugin(names: string[], handler: function): void
  • Register plugin(s) This acts as the same as on() of EventEmitter, for registering a handler/listener to do something when the signal/event happens.

    Parameters

    • names: string

      a string or an array of strings to generate the id(group name) of plugins

    • handler: function

      a function which provides the plugin functionality *

        • (this: this, ...args: any[]): void
        • Parameters

          • this: this
          • Rest ...args: any[]

          Returns void

    Returns void

  • Parameters

    • names: string[]
    • handler: function
        • (this: this, ...args: any[]): void
        • Parameters

          • this: this
          • Rest ...args: any[]

          Returns void

    Returns void

trace

  • trace(message: string): void

Static mixin

  • mixin(proto: any): void
  • Parameters

    • proto: any

    Returns void

Generated using TypeDoc