An Eco template loader for webpack
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead of fson:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
index.js
package.json

README.md

An Eco template loader for webpack

Usage

Inline

var template = require('eco!./template.eco');
// => returns a template function

Configuration

You can also add the loader to your webpack.config.js file.

module.exports = {
  module: {
    loaders: [
      // Files with the .eco extension will use the eco-loader.
      {test: /\.eco$/, loader: 'eco-loader'}
    ]
  },
  resolve: {
    // .eco added to the default extensions.
    extensions: ['', '.webpack.js', '.web.js', '.js', '.eco']
  }
};

After that the template can be loaded without specifying the loader and the .eco extension.

var template = require('./template');
// => returns a template function

License

MIT (http://opensource.org/licenses/MIT)