tasks/versioning.js
function versioningPHP ( obj, dest, ns ) {
        var contents = '<?php\n';
        contents += 'return array(\n';
        contents += '    \'' + ns + '\' => array(\n';
        for ( var key in obj ) {
            if ( obj.hasOwnProperty( key ) ) {
                contents += '        \'' + key + '\' => array(\n';
                contents += '            \'css\' => array(\n';
                contents += extractFiles( obj[ key ].css );
                contents += '            ),\n';
                contents += '            \'js\' => array(\n';
                contents += extractFiles( obj[ key ].js );
                contents += '            ),\n';
                contents += '        ),\n';
            }
        }
        contents += '    )\n';
        contents += ');\n';

        grunt.log.subhead( 'Generating PHP config file' );
        grunt.file.write( dest + '/assets.config.php', contents );
        grunt.log.ok( 'File "' + dest + '/assets.config.php" created.' );
    }
function versioningPHP ( obj, dest, ns ) {
        var contents = '<?php\n';
        contents += 'return array(\n';
        contents += '    \'' + ns + '\' => array(\n';
        for ( var key in obj ) {
            if ( obj.hasOwnProperty( key ) ) {
                contents += '        \'' + key + '\' => array(\n';
                contents += '            \'css\' => array(\n';
                contents += extractFiles( obj[ key ].css );
                contents += '            ),\n';
                contents += '            \'js\' => array(\n';
                contents += extractFiles( obj[ key ].js );
                contents += '            ),\n';
                contents += '        ),\n';
            }
        }
        contents += '    )\n';
        contents += ');\n';

        grunt.log.subhead( 'Generating PHP config file' );
        grunt.file.write( dest + '/assets.config.php', contents );
        grunt.log.ok( 'File "' + dest + '/assets.config.php" created.' );
    }
function versioningPHP ( obj , dest , ns ) { var contents = '<?php\n' ; contents += 'return array(\n' ; contents += '    \'' + ns + '\' => array(\n' ; for ( var key in obj ) { if ( obj . hasOwnProperty ( key ) ) { contents += '        \'' + key + '\' => array(\n' ; contents += '            \'css\' => array(\n' ; contents += extractFiles ( obj [ key ] . css ) ; contents += '            ),\n' ; contents += '            \'js\' => array(\n' ; contents += extractFiles ( obj [ key ] . js ) ; contents += '            ),\n' ; contents += '        ),\n' ; } } contents += '    )\n' ; contents += ');\n' ; grunt . log . subhead ( 'Generating PHP config file' ) ; grunt . file . write ( dest + '/assets.config.php' , contents ) ; grunt . log . ok ( 'File "' + dest + '/assets.config.php" created.' ) ; }
Generate a PHP config file

@todo   Determine if keeping these in this file is the right approach

@param  {Object} obj  Versioning object created by the task
@param  {String} dest Location to save the generated config file
@param  {String} ns   Namespace to wrap config content
@return {undefined}
Generate a PHP config file