Skip to content

Commit

Permalink
#94 checking dependencies in loose code
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Jun 26, 2013
1 parent 9796ffd commit 0e37349
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/helpers/minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ function js( $dom=false, $file=false ){

// if no src add to the config file
if( empty($src) && $data['require'] ) {
$client .= $script->textContent;
// #94 check dependencies
if( !empty( $data['deps'] ) ){
$deps = explode(",", $data['deps']);
$client .= "require(". json_encode( $deps ) .", function(){ ". $script->textContent ." });";
} else {
$client .= $script->textContent;
}
// no further processing required
continue;
}
Expand Down

0 comments on commit 0e37349

Please sign in to comment.