https://github.com/cusspvz/ect-loader
ect templates compiler for webpack
https://github.com/cusspvz/ect-loader
Last synced: 2 days ago
JSON representation
ect templates compiler for webpack
- Host: GitHub
- URL: https://github.com/cusspvz/ect-loader
- Owner: cusspvz
- Created: 2015-09-22T23:34:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T23:46:59.000Z (over 9 years ago)
- Last Synced: 2025-03-30T08:12:34.947Z (28 days ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# [ect](http://ectjs.com/)-loader
[ect](http://ectjs.com/) templates compiler for webpack## Motivation
[ectjs](http://ectjs.com/) is one of the fastest templating libraries out there,
but not so well known by the community.As there wasn't a loader for webpack, I've decided to build one before going to
bed. Here it is, show your apretiation by starring the project, tweeting and
enjoy using it.## Installation
```
npm i --save-dev ect-loader
```## Usage
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
### Example config
This webpack config can compile ect templates for you to use on your browser
without having to load `ECT` and `CoffeeScript` browser versions.``` javascript
module.exports = {
module: {
loaders: [
{ test: /\.ect$/, loader: "ect" }
]
}
};
```## Minification
This loader minifies template before compiling in case you're running with
performance enhancment option (`webpack -p`).It works by cutting off spaces between **HTML tags** and line-breaks.
### Source Example
```
<%- __ "Read the docs" %>
```### Minified output
```Lê a documentação
```