PHP code example of thedava / gruntfile-generator

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

    

thedava / gruntfile-generator example snippets




return array(
    Gruntfile::CONFIG_IMPORTS => array(
        'your-grunt-import'
    ),
    Gruntfile::CONFIG_TASKS => array(
        'your_task' => array(
            'some:target'
        )
    ),
    Gruntfile::CONFIG_TARGETS => array(
        'some' => array(
            'target' => array(
                'do' => 'something'
            )
        )
    )
);



return array(
    Gruntfile::CONFIG_IMPORTS => array(
        'grunt-exec'
    ),
    Gruntfile::CONFIG_TASKS => array(
        'gruntfile' => array(
            'exec:gruntfile'
        )
    ),
    Gruntfile::CONFIG_TARGETS => array(
        'exec' => array(
            'gruntfile' => 'php bin/gruntfile --config=this_file.php --gruntfile=Gruntfile.js'
        )
    )
);



$configFiles = glob(__DIR__.'/tasks/*.config.php');
return Gruntfile::mergeConfigs($configFiles);