You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

temple-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temple-loader

Temple loader for webpack

1.0.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 05 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts