0.1.0 • Published 5 years ago

posthtml-insert v0.1.0

Weekly downloads
98
License
MIT
Repository
github
Last release
5 years ago

posthtml-insert

PostHTML plugin to insert content after HTML tag.

Installation

npm install posthtml-insert --save

Usage

const posthtml = require('posthtml')
const insert = require('posthtml-insert')

posthtml([insert({ selector: 'body', content: '<div>test</div>' })])
  .process('<body></body>')
  .then(({ html }) => {
    console.log(html)
    // => '<body><div>test</div></body>'
  })