kylekatarnls/jade-phalcon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kylekatarnls/jade-phalcon

最新稳定版本:1.0.0

Composer 安装命令:

composer require kylekatarnls/jade-phalcon

包简介

HAML-like template engine for phalcon

README 文档

README

This repository now lives on https://github.com/pug-php/pug-phalcon

pug-phalcon

Pug Template Engine for Phalcon

To use Pug with your Phalcon application, just add to composer.json, in the require section:

"pug-php/pug-phalcon": "^1.0"

Or use the command line:

composer require pug-php/pug-phalcon

Then register the template:

require '../vendor/autoload.php';

// ...
$di = new FactoryDefault();

// Setting up the view component
$di['view'] = function() {
    $view = new View();
    $view->setViewsDir('../app/views/');
    $view->registerEngines(array(
        ".pug" => function($view, $di) {
            return new \Phalcon\Mvc\View\Engine\Pug($view, $di, array(
                'cache' => '/tmp/myproject/pug',
                'prettyprint' => APP_ENV == 'development',
            ));
        }
    ));

    return $view;
};

Now you can add pug files in the views directory:

app/views/index.pug:

doctype html
html
  head
    title pug-phalcon
  body
    p Generetad with pug-phalcon

统计信息

  • 总下载量: 51
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-03