2017 © Pedro Peláez
 

library organizer

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

image

gckabir/organizer

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

  • Friday, March 4, 2016
  • by kabir-baidhya
  • Repository
  • 1 Watchers
  • 0 Stars
  • 49 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Organizer

Note: This is deprecated, better use things like gulp, webpack or browserify to better organize your stuffs, (*1)

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

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 & minify them so that it could be fetched just by a single http request., (*3)

Features

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

Getting Started

Installation

Installing Organizer via Composer is very simple . Just add this in your composer.json, (*4)

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

And run composer install or update, (*5)

Step 1: Configuration

Configuring as simple as:, (*6)

// Organizer Config
$config = [
    'serverUrl' => 'http://localhost/<your-project>/',  // 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., (*7)

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

includeHere() ?>

Or, (*8)

<script type="text/javascript" src="<?php echo $js->build() ?>"></script>

The Difference

Instead of doing this:, (*9)






















You can do this; pretty simply:, (*10)

add([
    'core/module',
    'core/constants',
    'core/services/*',
    'core/directives/*',
    'core/run',

    // Content
    'content/module',
    'content/config',
    'content/controllers/*',
]);
?>

The Versions

04/03 2016

dev-master

9999999-dev

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

  Sources   Download

The Requires

 

The Development Requires

by Kabir Baidhya

03/12 2014

v0.70

0.70.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

20/10 2014

v0.60

0.60.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

19/10 2014

v0.59

0.59.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

19/10 2014

v0.58

0.58.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

13/10 2014

v0.57

0.57.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

12/10 2014

v0.56

0.56.0.0

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

  Sources   Download

The Requires

 

by Kabir Baidhya

10/10 2014

dev-dev

dev-dev

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

  Sources   Download

The Requires

 

by Kabir Baidhya