PHPackages                             pjparra/assetic-smarty - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pjparra/assetic-smarty

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pjparra/assetic-smarty
======================

Assetic plugin for Smarty

1.0.0(9y ago)1211910[3 issues](https://github.com/pjparra/assetic-smarty/issues)[1 PRs](https://github.com/pjparra/assetic-smarty/pulls)MITPHPPHP &gt;=5.3.1

Since May 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/pjparra/assetic-smarty)[ Packagist](https://packagist.org/packages/pjparra/assetic-smarty)[ Docs](https://github.com/pjparra/assetic-smarty)[ RSS](/packages/pjparra-assetic-smarty/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Smarty
------

[](#smarty)

Assetic can easily be integrated with Smarty 3 with this Smarty plugin. Just drop this plugin in the Assetic/Extensions/Smarty folder.

First, you have to add Assetic/Extension/Smarty to your Smarty plugins\_dir:

```
$smarty = new Smarty();
// ...
$smarty->plugins_dir[] = 'path/to/Assetic/Extension/Smarty';
```

A simple usage example:

```
{assetic
    assets="style/reset.css,style/common.css,style/other.css"
    output="css"
    config_path="config"
    build_path="style/build"
    debug=false
    filters="yui_css,less"
    asset_url=asset_url}

{/assetic}
```

Here is a list of the possible parameters:

- assets: A coma-separated list of files to include in the build (can be CSS or JS files)
- bundle: A bundle name. We will talk about it later. Incompatible with the "assets" parameter, you have to choose between the two.
- output: The kind of output you want, can be "css" or "js"
- config\_path: The folder where the plugin will find the configuration files (we will talk about these ones later)
- build\_path: The folder where the plugin will store your all-in-one asset
- debug: If set to true, the plugin will not combine your assets to allow easier debug
- filters: A coma-separated list of filters to apply. Currently, only LESS and YuiCompressor (both CSS and JS) are supported
- asset\_url: The variable name that will be used to pass the asset URL to the &lt;link&gt; tag

There are 3 external files you need to provide:

config.json:

```
{
    "yuicompressor_path": "/path/to/yuicompressor.jar",
    "closurejar_path": "/path/to/google_closure/compiler.jar",
    "cssembed_path": "/path/to/...",
    "java_path": "/usr/bin/java"
}
```

Following your preferences, you can choose one of the 2 other files:

bundles.json allows you to simply tell which files you want to include in a bundle:

```
{
    "css":
    {
        "main":
        [
            "css/reset.css",
            "css/common.css",
            "css/other.css"
        ]
    }
}
```

This file would allow you to use the "main" bundle name in the "bundle" parameter rather than just giving the list of file names to the "assets" parameter

dependencies.json is a bit more complicated but allows you to benefit from the AssetReference Assetic's feature. Very useful for JS assets:

```
{
    "js":
    {
        "references":
        {
            "awesomelib": "js/awesome.lib.js",
            "anotherlib": "js/another.lib.js",
            "somejs": "js/just.some.js.file.js"
        },
        "assets":
        {
            "js/foo.js": ["awesomelib","anotherlib"],
            "js/bar.js": ["somejs"],
            "js/no.dependencies.js": []
        }
    }
}
```

This allows you to keep track of dependencies between JS files, which can be very handy. Then, you only specify the names of your "useful" JS files in the "assets" parameter. The plugin will take care of including only the necessary dependencies for you, without any duplicates. So if you write "js/foo.js,js/no.dependencies.js" in the assets parameter, the plugin will combine js/awesome.lib.js, js/another.lib.hs, js/foo.js and js/no.dependencies.js into the build.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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

Unknown

Total

1

Last Release

3335d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/724416?v=4)[Pierre-Jean Parra](/maintainers/pjparra)[@pjparra](https://github.com/pjparra)

---

Top Contributors

[![pjparra](https://avatars.githubusercontent.com/u/724416?v=4)](https://github.com/pjparra "pjparra (18 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (3 commits)")[![gigo6000](https://avatars.githubusercontent.com/u/387648?v=4)](https://github.com/gigo6000 "gigo6000 (1 commits)")

---

Tags

phpcompressionasseticassetsminificationsmarty

### Embed Badge

![Health badge](/badges/pjparra-assetic-smarty/health.svg)

```
[![Health](https://phpackages.com/badges/pjparra-assetic-smarty/health.svg)](https://phpackages.com/packages/pjparra-assetic-smarty)
```

###  Alternatives

[assetic/framework

Asset Management for PHP

1011.5M22](/packages/assetic-framework)[ju1ius/webpack-assets-bundle

Integrates Webpack into Symfony2

1461.8k](/packages/ju1ius-webpack-assets-bundle)[eslider/sasscb

SASS compiler binaries

1221.2k1](/packages/eslider-sasscb)[konstantin-kuklin/assetic-static-gzip-bundle

Provide static gzip compression for css,js files via AsseticBundle

149.2k1](/packages/konstantin-kuklin-assetic-static-gzip-bundle)

PHPackages © 2026

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