PHP code example of dgncan / init

1. Go to this page and download the library: Download dgncan/init 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/ */

    

dgncan / init example snippets


    
    
    
        'application-name'=>'example-project',  // oject folder for detail example 
            'Update adminlte-minimal'=>[
                'vendor'=>'/vendor/dgncan/adminlte-minimal',
                'public'=>'/public/adminlte',
                'files' => [
                    '/dist/css/AdminLTE.min.css',
                    '/dist/css/skins/_all-skins.min.css',
                ]
            ]
        ],
        'update-tasks'=>
        [
            'Sample dummy process'=>
                function ($args) {
                    print_r($args);
                    echo "sample dummy processed\n";
                },
            /*
              //for sample use only.      
            'minify css/custom-style.css'=>
                function () {
                    $cmd = "php vendor/tubalmartin/cssmin/cssmin -i " . getcwd() . "/public/css/custom-style.css -o " . getcwd() . "/public/css/custom-style.min.css -R";
                    system($cmd, $r);
                    if ($r == 1) {
                        throw new Exception("Fail cmd:" . $cmd);
                    }
                }
            */                    
        ],
        'update-http-conf'=>
        [
            'confPath'=> [
                'local'=>'.',                     // optional for example: /usr/local/httpd_docs/conf/
                'test'=>'/work/test/conf/',       // optional
                'preprod'=>'/work/preprod/conf/', // optional
                'prod'=>'/work/prod/conf/'        // optional
            ]
        ],
        'prod-ini-file' => '/sensitive-data-location-path/init/prod.ini', // optional
        'permission' =>
        [
            'chown'=>'www.www', // optional
            'chmod'=>'755'      // optional
        ]
    ];