Seamless integration between Rollup and PostHTML.
Install
$ npm i rollup-plugin-posthtml-template -D# or $ yarn add rollup-plugin-posthtml-template -D
Usage
// rollup.config.js;; entry: dest: format: 'iife' plugins: ;
<!-- hello.html -->HelloWorld
// main.js; documentinnerHTML = hello;/* Output: <p>Hello</p> <p>World</p>*/
plugins
// rollup.config.js;;; entry: dest: format: 'iife' plugins: ;
<!-- world.html -->World
<!-- hello.html -->Hello
// main.js; documentinnerHTML = hello;/* Output: <p>Hello</p> <p>World</p>*/
template
// rollup.config.js;; entry: dest: format: 'iife' plugins: ;
<!-- hello.html -->Hello${ _.text }
// main.js; documentinnerHTML = ;/* Output: <p>Hello</p> <p>World</p>*/
parser
// rollup.config.js;;; entry: dest: format: 'iife' plugins: ;
// hello.sgrp Hellop | World
// main.js; documentinnerHTML = hello;/* Output: <p>Hello</p> <p>World</p>*/
directives
// rollup.config.js;; entry: dest: format: 'iife' plugins: ;
<!-- hello.html -->Hello<%= text %>
// main.js; ; documentinnerHTML = text: 'World' ;/* Output: <p>Hello</p> <p>World</p>*/