1.0.4 • Published 9 years ago

temple-loader v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

temple-loader

A temple template loader for webpack.

General Usage

webpack configuration

{
  ...
  module: {
    loaders: [
      ...
      { test: /\.temple/, loader: "temple-loader" }
    ]
  }
}

Your JS making use of the templates

<div>
  <forall name="files" key="files">
    <div>{{name}}
  </forall>
<div>
var temple_utils = require('temple-wat');
var template = require("./files_list.temple");
var pool = temple_utils.pool(template);
var data = {
  files: [{name: 'foo'}]
};
var temple_data = pool.get('files_list'); // => returns file.temple content as a temple obj
document.body.appendChild(temple_data[0]);
temple_data[1].update(data);

See webpack documentation for more information regarding loaders.

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago