[英]I dont want assetic to oneline my javascript in dev
I am using Assetic with a symfony2 application which mostly works fine. 我正在使用带有symfony2应用程序的Assetic,该应用程序通常都能正常工作。 One thing that is bugging me though is that in the dev enviroment (app_dev.php) assetic onelines my javascript files.
令我烦恼的一件事是,在开发环境(app_dev.php)中,资产资产支持我的javascript文件。 This is a pain in the ass to debug.
这是调试的麻烦。 (Guess what : the error is on line 1 ... duhh )
(猜猜是什么:错误在第1行上……duhh)
Is there a way to tell Assetic not to oneline the js files in the dev enviroment ? 有没有办法告诉Assetic不要在开发环境中将js文件放在一行?
For the moment I have : (config.yml) 目前,我有:(config.yml)
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
bundles: [ ]
# java: /usr/bin/java
filters:
cssrewrite: ~
# closure:
# jar: %kernel.root_dir%/java/compiler.jar
yui_css:
jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
yui_js:
jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
And in config_dev.yml : 并在config_dev.yml中:
assetic:
use_controller: true
You should disable minification in debug mode. 您应该在调试模式下禁用缩小。 See this document for more info:
有关更多信息,请参见此文档:
http://symfony.com/doc/master/cookbook/assetic/yuicompressor.html#disable-minification-in-debug-mode http://symfony.com/doc/master/cookbook/assetic/yuicompressor.html#disable-minification-in-debug-mode
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.