trucks-plugin-generate

1.0.11 • Public • Published

Generate

Generate output file contents

For each default output type create an output file. When no transforms are enabled this makes the compiler pass through HTML, CSS and Javascript declared in the input component files.

Install

npm i trucks-plugin-generate --save-dev


Usage

This plugin is bundled with the core trucks-compiler library.

You can configure this plugin using the generate field:

const options {
  conf: {
    plugins: {
      generate: {
        /* plugin configuration */
      }
    }
  }
}

Or as a convenient shortcut use the top-level generate field:

const options {
  generate: {
    /* plugin configuration */
  }
}

API

generate

public generate(state, conf)

Create default output file contents and run generator plugins.

Returns plugin closure.

  • state Object compiler state.
  • conf Object plugin configuration.

Options

  • generators Array list generator plugins to run.

License

MIT


Created by mkdoc on August 5, 2016

Readme

Keywords

none

Package Sidebar

Install

npm i trucks-plugin-generate

Weekly Downloads

8

Version

1.0.11

License

MIT

Last publish

Collaborators

  • muji
  • tmpfs