1.0.0 • Published 6 years ago

posthtml-inline v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

posthtml-inline

Inline assets via CLI or PostHTML

Just npm install posthtml posthtml-inline and add the following to your package.json:

{
  "scripts": {
    "build": "... your build command ...",
    "postbuild": "posthtml-inline dist index.html"
  }
}

You can also use as a PostHTML plugin like this:

const path = require('path');
const posthtml = require('posthtml');
const inline = require('posthtml-inline');

posthtml([
  inline({
    root: path.join(__dirname, 'dist')
  })
]).process(html);