0.0.11 • Published 9 years ago

hamlc-loader v0.0.11

Weekly downloads
1,705
License
MIT
Repository
github
Last release
9 years ago

Haml-Coffee (Hamlc) Loader for Webpack

Import haml-coffee files as modules in your webpack project. Returns a template function to render the template.

Setup

Add to your webpack config module.loaders:

{ test: /\.hamlc$/, loader: "hamlc-loader" }

Including templates in modules

webpack/assets/javascripts/templates/my_template.hamlc

.template
  %h1= @title

webpack/assets/javascripts/modules/my_module.js

MyTemplate = require("templates/my_template.hamlc")
MyTemplate({title: 'Go Boundless!'})

will return the HTML:

<div class="template">
  <h1>Go Boundless!</h1>
</div>
0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.4

9 years ago