Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posthtmlify

posthtml transform for documentify.

npm travis standard

Install

npm install posthtmlify

Usage

package.json

{
  "documentify": {
    "transform": [
      ["posthtmlify", {
        "use": [
          "posthtml-custom-elements"
        ]
      }]
    ]
  }
}

Node API

var documentify = require('documentify')
var posthtmlify = require('posthtmlify')

var d = documentify('./index.html').transform(posthtmlify, {
  use: ['posthtml-custom-elements']
})

documentify cli:

documentify input.html -t posthtmlify > output.html

With options:

documentify input.html -t [ posthtmlify --use posthtml-custom-elements ] > output.html

Passing options to posthtml plugins:

documentify input.html -t [ posthtmlify --use [ posthtml-include --root "${PWD}" ] ] > output.html

Options

use: []

List of posthtml plugins to use. Items can be plugin names or factory functions, or arrays containing a plugin name or factory function and an options object.

d.transform(posthtmlify, {
  use: [
    'posthtml-custom-elements',
    ['posthtml-custom-elements', { option: 'value' }],
    [require('posthtml-custom-elements'), {}]
  ]
})

parser: 'posthtml-parser'

HTML parser module to use. Can be a string module name or a parse function.

d.transform(posthtmlify, {
  parser: 'posthtml-pug'
})

render: 'posthtml-render'

Render module to use. Can be a string module name or a parse function.

d.transform(posthtmlify, {
  render: 'posthtml-jsx'
})

License

MIT

About

posthtml transform for documentify

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages