mirror of
https://github.com/cupcakearmy/cometa.git
synced 2025-03-12 06:17:29 +00:00
Constructor Doc
This commit is contained in:
parent
cb9a825865
commit
a455c65c60
28
README.md
28
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user