Download the PHP package h4md1/jsqueeze-bundle without Composer
On this page you can find all versions of the php package h4md1/jsqueeze-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download h4md1/jsqueeze-bundle
More information about h4md1/jsqueeze-bundle
Files in h4md1/jsqueeze-bundle
Download h4md1/jsqueeze-bundle
More information about h4md1/jsqueeze-bundle
Files in h4md1/jsqueeze-bundle
Vendor h4md1
Package jsqueeze-bundle
Short Description This bundle allows you to use jsqueeze in your twig template.
License MIT
Package jsqueeze-bundle
Short Description This bundle allows you to use jsqueeze in your twig template.
License MIT
Please rate this library. Is it a good library?
Informations about the package jsqueeze-bundle
H4md1JsqueezeBundle
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.
All versions of jsqueeze-bundle with dependencies
PHP Build Version
Package Version
The package h4md1/jsqueeze-bundle contains the following files
Loading the files please wait ...
