partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit a7c3e06bfccf0da38441376eba4a2d08487a8825
parent a6dbb8f8f9205264d934440229aa87d90b0d551b
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue, 17 Jul 2012 06:29:31 +0200

Added support for individual files as source

Diffstat:
Msrc/backend/PartKeepr/Console/Commands/MinifyJSCommand.php | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/backend/PartKeepr/Console/Commands/MinifyJSCommand.php b/src/backend/PartKeepr/Console/Commands/MinifyJSCommand.php @@ -239,9 +239,16 @@ EOT */ protected function getJSFilesForPath($path) { - $call = 'find ' . $path . ' -name "*.js" -type f'; - exec($call, $output); + if (is_dir($path)) { + $call = 'find ' . $path . ' -name "*.js" -type f'; + exec($call, $output); + return $output; + } + + if (is_file($path)) { + return array($path); + } - return $output; + return array(); } }