跳转到主要内容

Mustache到javascript编译器。

项目描述

Mustache到javascript编译器

使用Python编写的Mustache到javascript编译器。它基于twitter hogan.js编译器 http://twitter.github.com/hogan.js/

Hogan.Template 仍然需要用于渲染。

安装

  1. 安装virtualenv

    $ wget https://raw.github.com/pypa/virtualenv/master/virtualenv.py
    $ python2.7 ./virtualenv.py --no-site-packages venv
  2. 从github克隆pyhogan然后安装

    $ git clone git://github.com/fafhrd91/pyhogan.git
    $ cd pyhogan
    $ ../venv/bin/python setup.py develop
  3. 编译你的mustache模板

    $ ../venv/bin/pyhogan template.mustache
    
    new Hogan.Template(function(c,p,i){...}

测试

测试需要Node.js

$ cd pyhogen/spec/
$ ../../venv/python ./mustache_spec.py

需求

  • Python 2.6及更高版本

  • Hogan.js 1.0.5

变更记录

0.2 (2012-02-09)

  • 修复了setup.py

0.1 (2012-02-09)

  • 首次发布

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

pyhogan-0.2.tar.gz (17.6 kB 查看哈希值)

上传时间:

由以下组织支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面