Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blikblum/incremental-bars-loader

Webpack loader for incremental-bars, an Handlebars backend for incremental-dom
https://github.com/blikblum/incremental-bars-loader

handlebars incremental-dom

Last synced: about 1 month ago
JSON representation

Webpack loader for incremental-bars, an Handlebars backend for incremental-dom

Awesome Lists containing this project

README

        

# incremental-bars loader

Webpack loader for [incremental-bars](https://github.com/atomictag/incremental-bars), an Handlebars backend for [incremental-dom](https://github.com/google/incremental-dom)

### Configuration

```javascript
//webpack.config.js
...
module: {
rules: [
...
{
test: /\.handlebars$/,
use: ['babel-loader', 'incremental-bars-loader']
}
]
},
// workaround to a webpack issue: https://github.com/webpack-contrib/css-loader/issues/447
node: {
fs: 'empty'
}

```

### Usage

```javascript
import template from 'mytemplate.handlebars'
import IncrementalDOM from 'incremental-dom'

let el = document.getElementById('to-render')
let data = {name: 'Hello', message: 'world'}

IncrementalDOM.patch(el, template, data)
```

See a complete application [example](https://github.com/blikblum/marionette.renderers/tree/master/examples/idom-handlebars)