Merge pull request #12 from Na7coldwater/combine

Added divider variable
This commit is contained in:
Timothy Warren 2011-12-06 08:45:09 -08:00
commit d62d9ff127

View File

@ -10,6 +10,9 @@
$folder = "src"; $folder = "src";
$src_folder = "{$folder}/modules"; $src_folder = "{$folder}/modules";
//The divider added between the contents of merged files
$divider = "\n// --------------------------------------------------------------------------\n\n";
$files = array(); $files = array();
//Get all the source files //Get all the source files
@ -31,7 +34,7 @@ if($dir = opendir($src_folder))
$new_file = file_get_contents("{$folder}/core.js") . "\n"; $new_file = file_get_contents("{$folder}/core.js") . "\n";
//Add polyfills //Add polyfills
$new_file .= "\n// --------------------------------------------------------------------------\n\n"; $new_file .= $divider;
$new_file .= file_get_contents("{$folder}/polyfill.js") . "\n"; $new_file .= file_get_contents("{$folder}/polyfill.js") . "\n";
@ -44,7 +47,7 @@ foreach($files as $f)
$module = implode("\n", $farray); $module = implode("\n", $farray);
$new_file .= "\n// --------------------------------------------------------------------------\n\n".$module."\n"; $new_file .= $divider.$module."\n";
} }