0.1.1 • Published 7 years ago

@knotworkjs/nunjucks v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@knotworkjs/nunjucks

NPM version build status Coveralls node version npm download license

nunjucks 模板引擎封装,文档请参考官网文档

NPM

使用

const Knotwork = require('@knotworkjs/core')
const Nunjucks = require('@knotworkjs/nunjucks')

const app = new Knotwork(__dirname)
const config = app.config

app
  .engine(new Nunjucks(config.view))
  .use(ctx => {
    ctx.render('index')
  })
  .startup()

可选项

  • root 模板根目录,接受字符串或字符串数组
  • ext 文件拓展名,不传默认 .nj
  • autoescape 是否自动转码
  • watch 监听文件变化
  • noCache 去除缓存

版本发布

# 发布里程碑版本
$ npm version major -m "Release %s milestone version"

# 常规版本发布
$ npm version minor -m "Release %s software version"

# 发布补丁修复版
$ npm version patch -m "Release %s hotfix version"

使用 npm 的 version 命令管理版本发布,更多命令可使用 npm version --help 查看

感谢

以下排名不分先后.

其他

查看升级日志.

0.1.1

7 years ago

0.1.0

7 years ago