vespakoen / assetcompressor Goto Github PK
View Code? Open in Web Editor NEWA Laravel bundle that minifies CSS and JS (MinifyCSS & Closure-compiler)
License: MIT License
A Laravel bundle that minifies CSS and JS (MinifyCSS & Closure-compiler)
License: MIT License
It's working now with Laravel v3.2, with slight modification in asset.php
$this->config = Config::get('layla_thirdparty_assetcompressor::assetcompressor');
needs to change to:
$this->config = Config::get('assetcompressor::assetcompressor');
Hey,
I just wonder if i missed something or shouldn't AssetCompressor look in bundle public directory rather than in projects public directory?
Example:
$assets = Asset::container('container')->bundle('mybundle');
$assets->add('jquery.ui.css', 'css/ui/jquery-ui-1.9.1.custom.min.css');
Witch yields following results:
Unhandled Exception
Message:
The Asset you are trying to compress does not exist (/var/www/public/project/public/css/ui/jquery-ui-1.9.1.custom.min.css)
Location:
/var/www/public/project/bundles/assetcompressor/asset.php on line 68
Also the bundle is know if we check with $this->bundle
anywhere in asset.php file.
EDIT (this kinda of works):
if( $this->bundle != 'application')
$file = path('public').'bundles/'.$this->bundle.'/'.$data['source'];
else
$file = path('public') . $data['source'];
It seems it tries to compress a cdn hosted file.
The Asset you are trying to compress does not exist (D:\Development\wamp\www\cms\public\https://www.google.com/jsapi)
It's not writing the minified js to public/cache. I'm receiving the following Exception:
Message:
filemtime() [function.filemtime]: stat failed for /Users/ryancouse/Sites/eddm/public/cache/modernizr.js,jquery.js,bootstrap.js,validate.js,hashchange.js,datepicker.js
Location:
/Users/ryancouse/Sites/eddm/laravel/file.php on line 136
Stack Trace:
#0 /Users/ryancouse/Sites/eddm/laravel/laravel.php(40): Laravel\Error::native(2, 'filemtime() [minify_script(Array, Array, Array, 'modernizr.js,jq...', true)
#5 /Users/ryancouse/Sites/eddm/bundles/assetcompressor/asset.php(34): AssetCompressor\Asset_Container->minify('script', Array)
#6 /Users/ryancouse/Sites/eddm/laravel/asset.php(215): AssetCompressor\Asset_Container->group('script')
#7 [internal function]: Laravel\Asset_Container->scripts()
#8 /Users/ryancouse/Sites/eddm/laravel/asset.php(49): call_user_func_array(Array, Array)
#9 /Users/ryancouse/Sites/eddm/laravel/view.php(366) : eval()'d code(76): Laravel\Asset::__callStatic('scripts', Array)
#10 /Users/ryancouse/Sites/eddm/laravel/view.php(366) : eval()'d code(76): AssetCompressor\Asset::scripts()
#11 /Users/ryancouse/Sites/eddm/laravel/view.php(366): eval()
#12 /Users/ryancouse/Sites/eddm/laravel/blade.php(71): Laravel\View->get()
#13 [internal function]: Laravel{closure}(Object(Laravel\View))
#14 /Users/ryancouse/Sites/eddm/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#15 /Users/ryancouse/Sites/eddm/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#16 /Users/ryancouse/Sites/eddm/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
#17 /Users/ryancouse/Sites/eddm/laravel/view.php(570): Laravel\View->render()
#18 /Users/ryancouse/Sites/eddm/laravel/response.php(246): Laravel\View->__toString()
#19 /Users/ryancouse/Sites/eddm/laravel/laravel.php(178): Laravel\Response->render()
#20 /Users/ryancouse/Sites/eddm/public/index.php(35): require('/Users/ryancous...')
#21 {main}
This has just created a file with a name so long that I cannot delete it or move it or read it or generally do anything whatsoever with it
(I'm on Windows)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.