0.1.3 • Published 6 years ago

htmlelement-loader v0.1.3

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

npm

npm install --save-dev htmlelement-loader
// 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!') }},
);
0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago