PHPackages                             salva/jshrink-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. salva/jshrink-bundle

AbandonedLibrary[Templating &amp; Views](/categories/templating)

salva/jshrink-bundle
====================

This bundle integrate jshrink library as Assetic filter and twig extension

1.1.4(10y ago)32386.8k—0%6[7 issues](https://github.com/nibsirahsieu/SalvaJshrinkBundle/issues)1MITPHPPHP ^5.3.2|^7.0

Since Oct 8Pushed 10y ago5 watchersCompare

[ Source](https://github.com/nibsirahsieu/SalvaJshrinkBundle)[ Packagist](https://packagist.org/packages/salva/jshrink-bundle)[ Docs](https://github.com/nibsirahsieu/SalvaJshrinkBundle)[ RSS](/packages/salva-jshrink-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (1)

SalvaJshrinkBundle
==================

[](#salvajshrinkbundle)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7e4c251f59e33746d55ad9d6b1e6b5e8b1d40203be3450a2928be8feaed40c98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616c76612f6a736872696e6b2d62756e646c652e737667)](https://packagist.org/packages/salva/jshrink-bundle)[![Build Status](https://camo.githubusercontent.com/2114635a6811646e7d614fe6e019fe11f3afbbfec0655bb33c3d5ec678e51939/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6e69627369726168736965752f53616c76614a736872696e6b42756e646c652e7376673f7374796c653d666c6174)](https://travis-ci.org/nibsirahsieu/SalvaJshrinkBundle)[![Total Downloads](https://camo.githubusercontent.com/62eb166647a87e0ebaa8e47f38cf5f168272f8c8ed826011bf47827f43121868/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616c76612f6a736872696e6b2d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/salva/jshrink-bundle)

This bundle integrate "[jshrink library](https://github.com/tedivm/JShrink)" as Assetic filter and twig extension.

Installation
============

[](#installation)

Step 1: Download the Bundle
---------------------------

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require salva/jshrink-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Step 2: Enable the Bundle
-------------------------

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding the following line in the `app/AppKernel.php`file of your project:

```
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Salva\JshrinkBundle\SalvaJshrinkBundle(),
        );
    }
}
```

Configuration
-------------

[](#configuration)

Optionally, add the configuration in your config file.

```
# app/config.yml
salva_jshrink:
    enabled: true # if false {% jshrink %} tag will not compress the content
    flaggedComments: true
```

Basic Usage
-----------

[](#basic-usage)

Minifying JavaScript files

```
{% javascripts '@AcmeFooBundle/Resources/public/js/*' filter='jshrink' %}

{% endjavascripts %}
```

Minifying inline JavaScript

```
{% jshrink %}

    $(document).ready(function() {
        // ...
    });

{% endjshrink %}
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 67.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~104 days

Recently: every ~94 days

Total

6

Last Release

3720d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.2

1.1.4PHP ^5.3.2|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c54e9e1b705ea609ab5f10593a9aee1ffa002be4d7878eb66f00baf27353454?d=identicon)[nibsirahsieu](/maintainers/nibsirahsieu)

---

Top Contributors

[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (31 commits)")[![nibsirahsieu](https://avatars.githubusercontent.com/u/208039?v=4)](https://github.com/nibsirahsieu "nibsirahsieu (10 commits)")[![artursvonda](https://avatars.githubusercontent.com/u/147427?v=4)](https://github.com/artursvonda "artursvonda (3 commits)")[![kix](https://avatars.githubusercontent.com/u/345754?v=4)](https://github.com/kix "kix (1 commits)")[![snc](https://avatars.githubusercontent.com/u/216730?v=4)](https://github.com/snc "snc (1 commits)")

---

Tags

twigjavascriptminifyasseticSymfony Bundlejshrink

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/salva-jshrink-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/salva-jshrink-bundle/health.svg)](https://phpackages.com/packages/salva-jshrink-bundle)
```

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91492.0M315](/packages/twig-extra-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)[nochso/html-compress-twig

Twig extension for compressing HTML and inline CSS/Javascript

84468.6k8](/packages/nochso-html-compress-twig)[voku/html-compress-twig

Twig extension for compressing HTML

252.3M](/packages/voku-html-compress-twig)[odan/twig-assets

Caching and compression for Twig assets (JavaScript and CSS).

2223.0k4](/packages/odan-twig-assets)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

1432.0k](/packages/symfony-ux-toolkit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
