我需要压缩一个库中的许多文件。但必须先装载其中一个。所以我需要做这样的事情:
{% javascripts
'@MyBundleBundle/Resources/public/js/foo-file.js'
'@MyBundleBundle/Resources/public/js/(everything except foo-file).js'
output='js/all.js'
%}
有什么想法吗?
尝试以下操作:
{% javascripts
'@MyBundleBundle/Resources/public/js/foo-file.js'
'@MyBundleBundle/Resources/public/js/*'
output='js/all.js'
%}
它将合并@MyBundleBundle/Resources/public/js/
目录中的每个文件,使foo-file.js
成为第一个文件。