PHPackages                             gckabir/organizer - 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. gckabir/organizer

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

gckabir/organizer
=================

Easily manage, organize, minify/compress static files (JS/CSS)

v0.70(11y ago)060PHPPHP &gt;=5.3.0

Since Oct 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/kabirbaidhya/Organizer)[ Packagist](https://packagist.org/packages/gckabir/organizer)[ RSS](/packages/gckabir-organizer/feed)WikiDiscussions master Synced today

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

Organizer
=========

[](#organizer)

**Note: This is deprecated, better use things like [gulp](http://gulpjs.com/), [webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to better organize your stuffs**

It is something that can help you better organize your static files(javascript/css) in your PHP based project.

Just organize your javascript/css files in what ever ways you want, keeping related code in seperate files and directories and later organizer can merge &amp; minify them so that it could be fetched just by a single http request.

Features
========

[](#features)

- Merging js/css files
- Minifying the bundle (merged code) using JShrink (for javascript) or CssMin (for CSS)
- Caching those files

Getting Started
===============

[](#getting-started)

### Installation

[](#installation)

Installing Organizer [via Composer](https://getcomposer.org/doc/00-intro.md) is very simple . Just add this in your composer.json

```
"require": {
    "gckabir/organizer": "*"
}

```

And run `composer install` or `update`

### Step 1: Configuration

[](#step-1-configuration)

Configuring as simple as:

```
// Organizer Config
$config = [
    'serverUrl'	=> 'http://localhost//',  // Site's base url
    'javascript'	=> [
        'useStrict'=> false,
        'basePath' 	=> 'js/',  // a directory containing all js files
        'minify'	=> false,
        'cache'		=> false,
    ]
];

\Gckabir\Organizer\OZR::init($config);
```

Just set the parameters and it's done.

### Step 2: Creating a bundle of js files

[](#step-2-creating-a-bundle-of-js-files)

```
$js = \Gckabir\Organizer\OZR::organizeJS('homepage-js', [
    'javascript1',
    'javascript2',
]);

// Additional files could be added like this
$js->add([
    'javascript3',
    'javascript4'
    ]);

// merge all files & build the bundle
$js->build();
```

### Step 3: Using the bundle in html

[](#step-3-using-the-bundle-in-html)

```

```

Or

```
