2017 © Pedro Peláez
 

symfony-bundle jsqueeze-bundle

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

image

h4md1/jsqueeze-bundle

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

  • Sunday, March 1, 2015
  • by killerwolf
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

H4md1JsqueezeBundle

SensioLabsInsight, (*1)

This bundle allows you to use jsqueeze in your twig template., (*2)

Installation

Step 1: Install H4md1JsqueezeBundle using Composer

Add JsqueezeBundle in your composer.json:, (*3)

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

Now tell composer to download the bundle by running the command:, (*4)

$ php composer.phar update h4md1/jsqueeze-bundle

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*5)

<?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, (*6)

<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, (*7)

License

This bundle is licensed under the MIT license., (*8)

The Versions

01/03 2015

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

01/03 2015

dev-develop

dev-develop

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

  Sources   Download

MIT

The Requires

 

01/03 2015

0.0.1

0.0.1.0

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

  Sources   Download

MIT

The Requires