ractive-loader
ractive template loader module for webpack
Last updated 6 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ractive-loader 
SYNC missed versions from official npm registry.

ractive-loader for webpack

Exports a Ractive template as a compiled template for webpack.

Usage

Documentation: using loaders

Quick start guide

Install this into your project:

$ npm install --save ractive-loader

Make all your .html files compile down to Ractive templates by modifying your webpack.config.js file:

/* webpack.config.js */
module.exports = {
  module: {
    loaders: [
      { test: /\.html$/, loader: 'ractive' }
    ]
  },
  ...
};

Then use your Ractive templates via require():

new Ractive({
  template: require('./mytemplate.html')
});

Alternate usage

You can also use it without modifying your config. Just explicitly call it on your require() call via a prefix:

new Ractive({
  template: require('ractive!./mytemplate.html')
});

Thanks

ractive-loader © 2014+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

Current Tags

  • 0.5.6                                ...           latest (6 years ago)

2 Versions

  • 0.5.6                                ...           6 years ago
  • 0.4.0-pre2                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |