PHPackages                             opensolutions/minify - 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. opensolutions/minify

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

opensolutions/minify
====================

A JS and CSS minifier tool (with additional benefits for projects using template engines such as Smarty)

1.0.0(12y ago)836.4k41BSD-2-ClausePHP

Since Feb 5Pushed 12y ago3 watchersCompare

[ Source](https://github.com/opensolutions/Minify)[ Packagist](https://packagist.org/packages/opensolutions/minify)[ RSS](/packages/opensolutions-minify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

Minify
======

[](#minify)

Minify is a JS and CSS minifier toolkit (with support for generating templates for engines such as Smarty).

Its main features are:

- automatically find all CSS/JS files in a given directory named `xxx-blah.css` where `xxx` is a three digit ordering / sequence number;
- minify these files and create a single file bundle;
- automatically generate template include files allowing production / development mode (i.e. use individual CSS/JS or bundles based on an application option);
- versioning for those using CDNs, future expiry dates, etc to ensure clients load fresh JS/CSS bundles.

See the **Example Usage** section below.

Usage
-----

[](#usage)

Using Minify is as simple as copying the included `minify-options.php.dist` to `minify-options.php` and editing to suit you environment. Then run the script:

```
./minify.php

```

A full destription of the available options is commented within `minify-options.php.dist` and the script has a help option:

```
./minify.php --help

```

Installation Options
--------------------

[](#installation-options)

- It's a simple script - you can just clone the directory;
- **Composer:** require `"opensolutions/minify": "dev-master"`
- **Packagist:**

Example Usage
-------------

[](#example-usage)

[IXP Manager](https://github.com/inex/IXP-Manager) uses Minify. You can see IXP Manager's [JS files here](https://github.com/inex/IXP-Manager/tree/develop/public/js) and its [CSS files here](https://github.com/inex/IXP-Manager/tree/develop/public/css).

The Minify script bundles the individual files into `min.bundle-vX.css` and `min.bundle-vX.js` files and also creates templates with logic for using the original uncompressed files or the compressed bundles in [this file for CSS](https://github.com/inex/IXP-Manager/blob/develop/application/views/header-css.tpl) and [this file for JS](https://github.com/inex/IXP-Manager/blob/develop/application/views/header-js.tpl).

The configuration for generating these [is here](https://github.com/inex/IXP-Manager/blob/develop/bin/minify-options.php).

Used By
-------

[](#used-by)

- [ePayroll](http://www.epayroll.ie/) - Online payroll processing and management.
- [IXP Manager](https://github.com/inex/IXP-Manager) - A web application to assist in the management of Internet Exchange Points (IXPs)
- [TallyStick](http://www.tallystick.net/) - Focus on what you love to do, while we take care of tracking your time.
- [ViMbAdmin](https://github.com/opensolutions/vimbadmin/wiki) - Virtual Mailbox Administration

Do you use Minify? Do you want to get listed here? Drop us a note to `info _at_ opensolutions _dot_ it` or open a pull request.

License and Copyright
---------------------

[](#license-and-copyright)

Copyright (c) 2010 - 2014, [Open Source Solutions Limited](http://www.opensolutions.ie/), Dublin, Ireland

Released under the BSD license:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Thirdparty Tools
----------------

[](#thirdparty-tools)

Minify includes two thirdparty tools:

- The [Google Closure Compiler](http://code.google.com/closure/compiler) licensed under the Apache License, Version 2.0.
- Yahoo's [YUI Compressor](http://developer.yahoo.com/yui/compressor/) issued under a BSD license.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

4486d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/804649?v=4)[Barry O'Donovan](/maintainers/barryo)[@barryo](https://github.com/barryo)

---

Top Contributors

[![barryo](https://avatars.githubusercontent.com/u/804649?v=4)](https://github.com/barryo "barryo (19 commits)")

---

Tags

minifyminifier

### Embed Badge

![Health badge](/badges/opensolutions-minify/health.svg)

```
[![Health](https://phpackages.com/badges/opensolutions-minify/health.svg)](https://phpackages.com/packages/opensolutions-minify)
```

###  Alternatives

[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[tedivm/jshrink

Javascript Minifier built in PHP

76037.7M139](/packages/tedivm-jshrink)[voku/html-min

HTML Compressor and Minifier

1804.7M39](/packages/voku-html-min)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[cerdic/css-tidy

CSSTidy is a CSS minifier

2092.0M6](/packages/cerdic-css-tidy)[natxet/cssmin

Minifying CSS

827.3M98](/packages/natxet-cssmin)

PHPackages © 2026

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