apeman-task-reacthtml

apeman task to generate static html from react component.

Usage no npm install needed!

<script type="module">
  import apemanTaskReacthtml from 'https://cdn.skypack.dev/apeman-task-reacthtml';
</script>

README

apeman-task-reacthtml

Build Status Code Climate Code Coverage npm Version JS Standard

apeman task to generate static html from react component.

Installation

$ npm install apeman-task-reacthtml --save-dev

Usage

  1. Define a task within Apemanfile.js
  2. Call the task via apeman task command.

Apemanfile.js

/** This is an example Apemanfile to use apeman-task-reacthtml */

'use strict'

module.exports = {
  $pkg: { /* ... */ },
  $tasks: {
    // Define your own task.
    'react:html': require('apeman-task-reacthtml')(
      'src/index.html.jsx',
      'public/index.html',
      {
        props: {}
        // Options
      }
    )
  }
}

Then,

$ apeman task my-task-01

Signature

apemanTaskReacthtml(src, dest, options) -> function

apeman task to generate static html from react component.

Args
Name Type Default Description
src string Source file name of component
dest string Destination file name
options Object Optional settings.
options.props Object Props to render

License

This software is released under the MIT License.

Links