h4md1/jsqueeze-bundle 问题修复 & 功能扩展

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

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

h4md1/jsqueeze-bundle

最新稳定版本:0.0.1

Composer 安装命令:

composer require h4md1/jsqueeze-bundle

包简介

This bundle allows you to use jsqueeze in your twig template.

README 文档

README

SensioLabsInsight

This bundle allows you to use jsqueeze in your twig template.

Installation

Step 1: Install H4md1JsqueezeBundle using Composer

Add JsqueezeBundle in your composer.json:

{
    "require": {
        "h4md1/jsqueeze-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update h4md1/jsqueeze-bundle

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new H4md1\JsqueezeBundle\H4md1JsqueezeBundle(),
        // ...
        );
    }

Usage

{% block content %}
    <h1>Hello {{ name }}!</h1>
    <script>
        {%- jsqueeze -%}
        (function(str)
        {
            var newstr;
            if('' !== str){
                newstr = str+'#'+str;
            }
            else{
                newstr = 'empty';
            }
        })('twice');
        {%- endjsqueeze -%}
    </script>
{% endblock %}

the code bellow will output

<h1>Hello {{ name }}!</h1>
<script>(function(e){var i;if(''!==e){i=e+'#'+e}else{i='empty'}})('twice');</script>

Known limitations and bugs

A lot for sure

License

This bundle is licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

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