eft-parser
Version:
ef.js template parser
31 lines (23 loc) • 1.13 kB
Markdown
# eft-parser
[](https://raw.githubusercontent.com/ClassicOldSong/eft-parser/master/LICENSE) [](https://www.npmjs.com/package/eft-parser) [](https://travis-ci.org/ClassicOldSong/eft-parser)
Parser for [ef.js](https://github.com/ClassicOldSong/ef.js) templates
## Usage
ES6
``` javascript
import parseEft from 'eft-parser'
// use `const parseEft = require('eft-parser')` for node.js
const template = 'Your awesome template here'
const ast = parseEft(template)
```
Browser
``` javascript
<script src="dist/eft-parser.js"></script>
<script>
var template = 'Your awesome template here'
var ast = parseEft(template)
</script>
```
**Note:** ef.js has a builtin parser, but if you want a faster first render, parse the templates beforehand could be better.
**Note:** All debugging messages are disabled in the production version
## License
[MIT](http://cos.mit-license.org/)