Skip to content

Commit

Permalink
Fix README markup
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykuzmenkov committed Nov 20, 2015
1 parent a4d2382 commit f71b617
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ t.update({welcome_text: 'JEXT works!'});
Now you can see rendered test template on your screen.

### Usage with webpack or whatever
First install loader for webpack. Instruction read here: https://www.npmjs.com/package/jext-loader.
First install loader for webpack. Instruction read here: (https://www.npmjs.com/package/jext-loader).

Install stuff:

Expand Down Expand Up @@ -130,14 +130,14 @@ Condition switches context as iteration. Its same easy to use.
### get(template, data)
Return template object from pool of available templates using the template key.

template - name of template. If your template name as mytemplate.jext it must be mytemplate (without extension).
data - optional. Pass data to render your template as object.
- *template* - name of template. If your template name as mytemplate.jext it must be mytemplate (without extension).
- *data* - optional. Pass data to render your template as object.

### release(template, instance)
It releases generate template from DOM tree

template - name of template.
instance - generated Node of this template.
- *template* - name of template.
- *instance* - generated Node of this template.

## Template object methods
When you get template from created pool, it has several methods to manipulate it.
Expand All @@ -146,7 +146,7 @@ When you get template from created pool, it has several methods to manipulate it
The method returns generated DOM tree for current template as DocumentFragment (see document.createDocumentFragment).

### update(data)
data - object to update and rerender current loaded template's DOM.
- *data* - object to update and rerender current loaded template's DOM.

### set(key, value)
Alias for update method. But apply key of variable and its value to easy update only what you need to.
Expand All @@ -155,4 +155,4 @@ Alias for update method. But apply key of variable and its value to easy update
This method removes rendered element from DOM tree.

## Loaders for JEXT
Webpack: https://www.npmjs.com/package/jext-loader.
Webpack: (https://www.npmjs.com/package/jext-loader).

0 comments on commit f71b617

Please sign in to comment.