Skip to content

Commit

Permalink
Handle possible comment in the end of scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jul 29, 2016
1 parent 011753b commit 755fb70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ First you need [composer](https://getcomposer.org/) if you have not already. The

use NodejsPhpFallback\Uglify;

// Require the composer autload in your PHP file if it's not already.
// Require the composer autoload in your PHP file if it's not already.
// You do not need to if you use a framework with composer like Symfony, Laravel, etc.
require 'vendor/autoload.php';

Expand Down
6 changes: 3 additions & 3 deletions src/NodejsPhpFallback/Uglify.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public function add($file)

public function getSource()
{
$source = trim(parent::getSource());
$source = parent::getSource();
foreach ($this->concat as $file) {
if ($this->getMode() === 'js') {
$source = rtrim($source, '; ') . ';';
$source .= "\n;";
}
$source .= trim(file_get_contents($file));
$source .= "\n" . file_get_contents($file);
}

return $source;
Expand Down

0 comments on commit 755fb70

Please sign in to comment.