Skip to content

Commit

Permalink
Merge branch 'master' into fatihky-swig-maintained-fork
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihky authored Sep 19, 2017
2 parents 17fdf75 + d0ee1ec commit 46f789e
Show file tree
Hide file tree
Showing 16 changed files with 410 additions and 79 deletions.
30 changes: 28 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
.DS_Store
node_modules
# always ignore files
*.DS_Store
*.sublime-*
.idea
*.sock

# test related, or directories generated by tests
test/actual
actual
coverage
.nyc*

# npm
node_modules
npm-debug.log

# yarn
yarn.lock
yarn-error.log

# misc
_gh_pages
_draft
_drafts
bower_components
vendor
temp
tmp
TODO.md
package-lock.json
11 changes: 11 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
0.15.0 / 2017-09-18
===================

* add plates support
* add teacup support
* add liquid-node support
* add velocityjs support
* allow absolute and relative partial paths
* extend dot options
* support layouts in vash

0.14.0 / 2016-01-24
===================

Expand Down
14 changes: 5 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
- [mote](https://github.com/satchmorun/mote) [(website)](http://satchmorun.github.io/mote/)
- [mustache](https://github.com/janl/mustache.js)
- [nunjucks](https://github.com/mozilla/nunjucks) [(website)](https://mozilla.github.io/nunjucks)
- [plates](https://github.com/flatiron/plates)
- [pug (formerly jade)](https://github.com/pugjs/pug) [(website)](http://jade-lang.com/)
- [QEJS](https://github.com/jepso/QEJS)
- [ractive](https://github.com/Rich-Harris/Ractive)
- [react](https://github.com/facebook/react)
- [slm](https://github.com/slm-lang/slm)
- [swig (maintained fork)](https://github.com/node-swig/swig-templates)
- [teacup](https://github.com/goodeggs/teacup)
- [templayed](http://archan937.github.com/templayed.js/)
- [twig](https://github.com/justjohn/twig.js)
- [liquid](https://github.com/leizongmin/tinyliquid) [(website)](http://liquidmarkup.org/)
Expand Down Expand Up @@ -103,15 +105,9 @@ cons.swig('views/page.html', { user: 'tobi' })

## Caching

To enable or disable caching simply pass `{ cache: true/false }`. Engines _may_ use this option to cache things reading the file contents, compiled `Function`s etc. Engines which do _not_ support this may simply ignore it. All engines that consolidate.js implements I/O for will cache the file contents, ideal for production environments.

```js
var cons = require('consolidate');
cons.swig('views/page.html', { cache: false, user: 'tobi' }, function(err, html){
if (err) throw err;
console.log(html);
});
```
To enable caching simply pass `{ cache: true }`. Engines _may_ use this option to cache things reading the file contents, compiled `Function`s etc. Engines which do _not_ support this may simply ignore it. All engines that consolidate.js implements I/O for will cache the file contents, ideal for production environments.
When using consolidate directly: `cons.swig('views/page.html', { user: 'tobi', cache:true }, callback);`
Using Express 3 or higher: `app.locals.cache = true` or set NODE_ENV to 'production' and Express will do this for you.

## Express 3.x example

Expand Down
Loading

0 comments on commit 46f789e

Please sign in to comment.