This package has been deprecated

Author message:

this package has been deprecated

htmlelement-loader

0.1.3 • Public • Published

npm

HTMLElement Loader

Exports HTML as HTMLElement.

Install

npm install --save-dev htmlelement-loader

Usage

// webpack.config.js
{
  test: /\.(html)$/,
  use: {
    loader: 'htmlelement-loader',
  }
}
<!-- test.html -->
<div data-action-click-clickEvent>
  #{message}
</div>
// use in code
import htmlBlock from './test.html';
var block = htmlBlock(
  /* wrapper tag name */
  'div',

  /* wrapper attributes */
  {class: 'wrapper'},
  
  /* html template props */
  {message: 'Hello world!'},

  /* html template action */
  {clickEvent: function(e) { alert('Hey!') }},
);

Readme

Keywords

none

Package Sidebar

Install

npm i htmlelement-loader

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • gebeto