README
apeman-task-reacthtml
apeman task to generate static html from react component.
Installation
$ npm install apeman-task-reacthtml --save-dev
Usage
- Define a task within Apemanfile.js
- 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.