PHPackages                             johnkrovitch/sam-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. [Framework](/categories/framework)
4. /
5. johnkrovitch/sam-bundle

AbandonedArchivedSymfony-bundle[Framework](/categories/framework)

johnkrovitch/sam-bundle
=======================

Bundle to integrate Sam library to Symfony

v0.2(7y ago)22.2k[2 issues](https://github.com/johnkrovitch/SamBundle/issues)[1 PRs](https://github.com/johnkrovitch/SamBundle/pulls)MITPHPPHP ^7.0

Since Apr 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/johnkrovitch/SamBundle)[ Packagist](https://packagist.org/packages/johnkrovitch/sam-bundle)[ RSS](/packages/johnkrovitch-sam-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

SamBundle
=========

[](#sambundle)

[![Build Status](https://camo.githubusercontent.com/dddaf7c8568267938536f8841814cdb473f825a076c5b826fdd499aeb686e87c/68747470733a2f2f7472617669732d63692e6f72672f6a6f686e6b726f76697463682f53616d42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/johnkrovitch/SamBundle)[![GuardRails badge](https://camo.githubusercontent.com/4ab91f032bf7b145b5e720b8629aa7111672d3087ba12c4930beaeef9401059d/68747470733a2f2f6261646765732e70726f64756374696f6e2e67756172647261696c732e696f2f6a6f686e6b726f76697463682f53616d42756e646c652e737667)](https://www.guardrails.io)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c4fdae29b14fe8d4679a35525dedff4e8522c24092d899963481c6fa2c572bd0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f686e6b726f76697463682f53616d42756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/johnkrovitch/SamBundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/1579aca8aabf066213e0dcef346d82f80c8121a31973449611c30ba8d2418db6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f686e6b726f76697463682f53616d42756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/johnkrovitch/SamBundle/?branch=master)

SamBundle for Symfony. Add a command to build the assets using configuration in app/config. SamBundle use the Sam library (stand for Simple Asset Manager) and will allow to configure how your assets will be build, minified and merged.

Introduction
------------

[](#introduction)

SamBundle will read a yaml configuration file. This file should contains a list of tasks. Each task is a list of sources files (js, css, scss...), a list of filters applied to those files, and a list a destination file.

Installation
------------

[](#installation)

```
    composer require johnkrovitch/sam-bundle
```

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

[](#configuration)

Add your configuration in config.yml

```
    jk_assets:
        # filters configuration
        filters:
            compass:
                # path to compass binary (if it is in $PATH, you could leave the default)
                bin: compass
            # activate merge, minify and copy filters
            merge: ~
            minify: ~
            copy: ~
        tasks:
            # a task
            # main.css is just a name, you could put what ever you want, but each task should have a unique name
            main.css:
                # first will apply the Compass filter, then the merge filter, then we minify
                # the process should be as following :
                #   1) the Compass filter will only take the ".scss" files, and compile them to ".css" files. The ".scss"
                # files we be replaced by the ".css" files in the sources list
                #   2) the merge filter will take all the files in the sources list
                filters:
                    - compass
                    - merge
                    - minify
                sources:
                    - app/Resources/assets/sass/main.scss
                    - vendor/components/bootstrap/css/bootstrap.min.css
                    - vendor/components/bootstrap/css/bootstrap-theme.min.css
                    - vendor/components/font-awesome/css/font-awesome.min.css
                    - app/Resources/assets/css/hover-min.css
                destinations:
                    - web/css/main.css

            fonts:
                filters: ~
                sources:
                    - vendor/components/bootstrap/fonts/
                    - vendor/components/font-awesome/fonts/
                destinations:
                    - web/fonts/

            cms.js:
                filters:
                    - merge
                    - minify
                sources:
                    - src/JK/CmsBundle/Resources/assets/js/jquery.iframe-transport.js
                    - src/JK/CmsBundle/Resources/assets/js/cms/fileupload.js
                    - vendor/blueimp/jquery-file-upload/js/jquery.fileupload.js
                destinations:
                    - src/JK/CmsBundle/Resources/public/js/cms.js

            tinymce.css:
                filters:
                    - compass
                    - merge
                    - minify
                sources:
                    - src/JK/CmsBundle/Resources/assets/sass/tinymce.scss
                    - web/css/custom-tinymce.css
                destinations:
                    - src/JK/CmsBundle/Resources/public/css/tinymce.css
```

Usage
-----

[](#usage)

After configuring your assets, you can execute the tasks with the following command :

```
    bin/console jk:assets:build
```

During development, you can use the watch command which monitor the configured assets and rebuild automatically the assets.

```
    bin/console jk:assets:watch
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.5% 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 ~601 days

Total

2

Last Release

2754d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1202965?v=4)[Arnaud Frézet](/maintainers/JohnKrovitch)[@johnkrovitch](https://github.com/johnkrovitch)

---

Top Contributors

[![johnkrovitch](https://avatars.githubusercontent.com/u/1202965?v=4)](https://github.com/johnkrovitch "johnkrovitch (55 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![guardrails[bot]](https://avatars.githubusercontent.com/in/5512?v=4)](https://github.com/guardrails[bot] "guardrails[bot] (1 commits)")

---

Tags

assetssymfonySymfony2assets

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/johnkrovitch-sam-bundle/health.svg)

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

PHPackages © 2026

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