Permalink
Browse files

Renaming to ect

  • Loading branch information...
1 parent 7c41eb2 commit cf9a25cee7874935a3b877bd806a8cb694851781 @baryshev committed Sep 10, 2012
Showing with 64 additions and 64 deletions.
  1. +1 −1 .npmignore
  2. +9 −9 README.md
  3. +0 −24 cent.min.js
  4. +24 −0 ect.min.js
  5. +2 −2 examples/example.js
  6. +1 −1 index.js
  7. +24 −24 lib/{cent.js → ect.js}
  8. +3 −3 package.json
View
@@ -1,3 +1,3 @@
.git*
examples/
-cent.min.js
+ect.min.js
View
@@ -1,10 +1,10 @@
-# Cent
+# ect
CoffeeScript template engine. Backward compatible with [eco](https://github.com/sstephenson/eco).
## Installation
- npm install cent
+ npm install ect
## Features
@@ -19,9 +19,9 @@ CoffeeScript template engine. Backward compatible with [eco](https://github.com/
## Usage
```js
-var Cent = require('cent');
+var ect = require('ect');
-var renderer = Cent({ root : __dirname + '/view', useCache : true, ext : '.html' });
+var renderer = ect({ root : __dirname + '/view', useCache : true, ext : '.html' });
renderer.render('page', { title: 'Hello, World!' }, function(error, html) {
console.log(error);
@@ -32,9 +32,9 @@ renderer.render('page', { title: 'Hello, World!' }, function(error, html) {
You may use JavaScript object as root.
```js
-var Cent = require('cent');
+var ect = require('ect');
-var renderer = Cent({ root : {
+var renderer = ect({ root : {
layout: '<html><head><title><%- title %></title></head><body><% content %></body></html>',
page: '<% extend "layout" %><p>Page content</p>'
}, useCache : true
@@ -46,7 +46,7 @@ renderer.render('page', { title: 'Hello, World!' }, function(error, html) {
});
```
-See full example in [examples](https://github.com/baryshev/cent/tree/master/examples) folder.
+See full example in [examples](https://github.com/baryshev/ect/tree/master/examples) folder.
## Syntax
@@ -142,10 +142,10 @@ Blocks supports more than one level of inheritance and may be redefined.
## Client-side support
-Basically, include [coffee-script.js](https://github.com/jashkenas/coffee-script/blob/master/extras/coffee-script.js) and [cent.min.js](https://github.com/baryshev/cent/tree/master/cent.min.js) to a page and Cent ready to use.
+Basically, include [coffee-script.js](https://github.com/jashkenas/coffee-script/blob/master/extras/coffee-script.js) and [ect.min.js](https://github.com/baryshev/ect/tree/master/ect.min.js) to a page and ect ready to use.
```js
-var renderer = Cent({ root : '/view', useCache : true });
+var renderer = ect({ root : '/view', useCache : true });
renderer.render('page', { title: 'Hello, World!' }, function(error, html) {
console.log(error);
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit cf9a25c

Please sign in to comment.