Closed vincentcordel closed 10 years ago
Note: this is also the case with a css file (not just with less)
@musixite what version of pipeline are you using? Can you show me your manifest file and also your config.php
if you have published one?
I created a config file but haven't changed it (I created it just in case I need to change something later).
Here's one of my css manifest: = require ../dm/flat-ui/bootstrap/css/bootstrap.css = require ../dm/flat-ui/bootstrap/css/bootstrap-responsive.css = require ../dm/flat-ui/css/flat-ui.css = require ../dm/common-files/css/icon-font.css *= require ../dm/css/style.css
And my js: //= require ../dm/flat-ui/js/jquery-1.8.3.min.js //= require ../dm/flat-ui/js/bootstrap.min.js //= require ../dm/flat-ui/js/icon-font-ie7.js //= require ../dm/common-files/js/jquery.scrollTo-1.4.3.1-min.js //= require ../dm/common-files/js/startup-kit.js //= require ../dm/js/script.js
The css and js files are generated. The less files are properly compiled. The only thing is it's not minified.
I'm wondering: do I need to install something else (that wasn't included in your install doc)?
Thanks for your help,
@musixite What version are you using?
The latest build (installed it yesterday following your instructions).
Here's my json:
"require": {
"laravel/framework": "4.1.*",
"codesleeve/asset-pipeline": "dev-master"
Maybe I'm looking at the wrong file?
I'm on a local machine and I'm checking the css file using the source on my browser then clicking on the generated css file (which is not minified).
Could it be that the minified css is only in production mode? If so, how can I see it when I try it locally?
Thanks again for all your support!
@musixite if you look at the config.php you will see
'.css' => array(
new Codesleeve\AssetPipeline\Filters\URLRewrite,
new EnvironmentFilter(new Assetic\Filter\CssMinFilter, App::environment()),
),
The environment filter is only going to run that CssMinFilter when your environment is production
. If you want it to be run on every environment then just do
new EnvironmentFilter(new Assetic\Filter\CssMinFilter, App::environment(), App::environment()),
Let me know if this did not resolve your issue.
@kdocki I just read your message today. Thanks!
I'm wondering if it's possible to have minified css on some of the environments, not all of them (i.e. staging and production but not local).
Where can I specify this (if I can)?
Thanks again!
publish your config file and use the EnvironmentFilter() in the filters
to control which environments you want to have minified...
Hi there,
When I use a directive with a less file, the compiled css is not minified.
Am I missing something to actually make it work?
Thanks!