作爲標題,在使用Assetic時有什麼方法將選項傳遞給UglifyJS2?具體而言,我需要通過--comments
選項。當使用Assetic Bundle時將選項傳遞給UglifyJS2
我試圖將選項添加到我的config.yml垃圾桶設置:bin: "%uglifyjs_bin_path% --comments"
,而是因爲它試圖在路徑中包含--comments不會運行:
[Assetic\Exception\FilterException]
An error occurred while running:
'/usr/bin/nodejs' '/usr/local/bin/uglifyjs --comments' '-o' '/tmp/assetic_ uglifyjs2_outyYVBye' '/tmp/assetic_uglifyjs2_ind932Xh' Error Output:
module.js:328throw err;
Error: Cannot find module '/usr/local/bin/uglifyjs --comments'at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3