PHPackages                             harrald/packager - 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. harrald/packager

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

harrald/packager
================

Packager is a PHP 5.3+ library to concatenate libraries split in multiple files in a single file. It automatically calculates dependancies. Packager requires a yml header syntax in every file, and a package.yml manifest file, as seen on the MooTools project.

2.0.x-dev(12y ago)019MITPHPPHP &gt;=5.3.0

Since Jul 12Pushed 12y ago1 watchersCompare

[ Source](https://github.com/Harrald/packager)[ Packagist](https://packagist.org/packages/harrald/packager)[ Docs](https://github.com/harrald/packager)[ RSS](/packages/harrald-packager/feed)WikiDiscussions 2.0 Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Packager
========

[](#packager)

Packager is a PHP 5.3+ library to concatenate libraries split in multiple files in a single file. It automatically calculates dependancies.

Packager requires a yml header syntax in every file, and a `package.yml` manifest file, as seen on the MooTools project.

2.0 Branch
----------

[](#20-branch)

This is an experimental branch, dedicated to a more programmatic approach to packaging (building) your JavaScript files.

With the previous Packager, you were **required** to define a `package.yml`. This is no longer the case. You're still able to work with your `package.json` or `package.yml` files, but you have the ability to define dependencies at runtime and build only the dependencies for that file.

Why?
----

[](#why)

I needed a more dynamic packager. On my web development, each web page varies between JavaScript uses. My home page, for example, might have a login area but the about us page does not. Why should I build a single `mootools.js` for the whole site? Even if I could keep track of what pages require what, it's not my job or the application's job to keep that in order.

Instead, I wanted to: ``. I wanted homepage.js to have a yml header, and for Packager to build a *specific build* for this **specific page**. The next step would be to create agent specific builds, but that's for another branch.

API 2.0
=======

[](#api-20)

Remember, the emphasis has been to create an actual API. The following are classes and their purpose. See the linked wiki pages, for additional method signatures and documentation.

[Packager](#)Packager is the "registry" of components, and the manager of building the dependencies.

[Package](#)A Package is a container of many sources. Due to the emphasis on Source, Package is not as useful **yet**.

[Source](#)A Source has many components (provides) and dependencies (requires). By defining a Source, you can add (provide) to the registry and build all dependencies for the source.

[Command Line Script](#)This is currently broken, and low priority for me. Pull requests, greatly appreciated.

Since I'm using Packager 2.0 as an API I no longer need a `npm|gem|pear`-like library for my development.

Getting Stated
==============

[](#getting-stated)

banana banana banana

For now, take a look at [sfPackagerPlugin](https://github.com/ibolmo/sfPackagerPlugin) for a programmatic usage of the 2.0 branch. In particular take a look at: [PackagerHelper](https://github.com/ibolmo/sfPackagerPlugin/blob/master/lib/helper/PackagerHelper.php) which has the "useful" interface, I had been talking about.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

4738d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/948437?v=4)[Harrald Torenvlied](/maintainers/Harrald)[@Harrald](https://github.com/Harrald)

---

Top Contributors

[![kamicane](https://avatars.githubusercontent.com/u/7131?v=4)](https://github.com/kamicane "kamicane (59 commits)")[![ibolmo](https://avatars.githubusercontent.com/u/27246?v=4)](https://github.com/ibolmo "ibolmo (34 commits)")[![timwienk](https://avatars.githubusercontent.com/u/150598?v=4)](https://github.com/timwienk "timwienk (12 commits)")[![holyshared](https://avatars.githubusercontent.com/u/167190?v=4)](https://github.com/holyshared "holyshared (10 commits)")[![appden](https://avatars.githubusercontent.com/u/70904?v=4)](https://github.com/appden "appden (7 commits)")[![subtleGradient](https://avatars.githubusercontent.com/u/4117?v=4)](https://github.com/subtleGradient "subtleGradient (7 commits)")[![Harrald](https://avatars.githubusercontent.com/u/948437?v=4)](https://github.com/Harrald "Harrald (5 commits)")[![slik](https://avatars.githubusercontent.com/u/98554?v=4)](https://github.com/slik "slik (4 commits)")[![cpojer](https://avatars.githubusercontent.com/u/13352?v=4)](https://github.com/cpojer "cpojer (4 commits)")[![thisconnect](https://avatars.githubusercontent.com/u/546900?v=4)](https://github.com/thisconnect "thisconnect (3 commits)")[![ryanflorence](https://avatars.githubusercontent.com/u/100200?v=4)](https://github.com/ryanflorence "ryanflorence (1 commits)")

---

Tags

javascriptpackagemootools

### Embed Badge

![Health badge](/badges/harrald-packager/health.svg)

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

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k45.9M318](/packages/tightenco-ziggy)[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k315.9M82](/packages/jean85-pretty-package-versions)[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.0k33.1M444](/packages/matthiasmullie-minify)[tedivm/jshrink

Javascript Minifier built in PHP

76339.9M177](/packages/tedivm-jshrink)

PHPackages © 2026

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