GitXplorerGitXplorer
f

eco-loader

public
3 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
b6aa028f31e591ca36c89649e145cc1807353562

Update README.md

ffson committed 11 years ago
Unverified
54ad4b4df5e64822108f80f4983b3eeeb0f39a05

Initial commit

committed 11 years ago

README

The README file for this repository.

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)