From a455c65c60f548dc1f38ee4091fc23bab376271d Mon Sep 17 00:00:00 2001 From: nicco Date: Thu, 22 Feb 2018 13:38:56 +0100 Subject: [PATCH] Constructor Doc --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4307bde..1ebdcf4 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ node app.js ### General Import +[Constructor Options](#constructor-options) + ```javascript // Import const Cometa = require('cometa') @@ -31,19 +33,6 @@ const Cometa = require('cometa') const cometa = new Cometa() ``` -### Constructor parameters - -- `views` [Optional] Root template folder -- `extension` [Optional] File extension for the templates -- `encoding` [Optional] Encoding to be used on the - -```javascript -new Cometa({ - views: './my/views/folder', - extension: 'html' -}) -``` - ## Installation 🚂 ```bash @@ -62,6 +51,17 @@ All options and expressions are **optional**. - `options` (`default`) description +###### Example + +```javascript +new Cometa({ + views: './someDir' +}, { + begin: '<<', + comment: '^' +}) +``` + #### Options - `views` (`./views`) Root template folder @@ -73,7 +73,7 @@ All options and expressions are **optional**. - `begin` (`{{`) Opening tags - `ending` (`}}`) Closing tags - `comment` (`#`) Comment char -- `incude` (`>`) Include char +- `inlcude` (`>`) Include char - `if` (`?`) If statement char - `if_invert` (`!`) Invert the variable in if statement - `for` (`*`) For char