PHP code example of gckabir / organizer

1. Go to this page and download the library: Download gckabir/organizer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gckabir / organizer example snippets


// 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);

$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();

 $js->

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

 
$js = OZR::organizeJS('js-bundle');
$js->add([
    'core/module',
    'core/constants',
    'core/services/*',
    'core/directives/*',
    'core/run',

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