项目作者: afeiship

项目描述 :
Literals template engine like es6.
高级语言: JavaScript
项目地址: git://github.com/afeiship/next-literal-tmpl.git
创建时间: 2016-11-18T04:42:23Z
项目社区:https://github.com/afeiship/next-literal-tmpl

开源协议:MIT License

下载


next-literal-tmpl

Literals template engine like es6.

@jswork/next-literal-tmpl"">version
license
size
@jswork/next-literal-tmpl"">download

installation

  1. npm install -S @jswork/next-literal-tmpl

usage

  1. import '@jswork/next-literal-tmpl';
  2. const str = '${GITHUB_API_TOKEN} - ${afei}';
  3. const ctx = {
  4. GITHUB_API_TOKEN: 'xxx-yyy-zzz',
  5. afei: 'zhengfei'
  6. };
  7. nx.literalTmpl(str, ctx);
  8. // 'xxx-yyy-zzz - zhengfei'

license

Code released under the MIT license.