0
我想從終端使用grunt獲取const名稱,並在uglify中使用它。這是我希望發生的:從終端執行const in grunt
uglify: {
options: {
sourceMap: true,
compress: {
global_defs: {
<myConst>: false
}
}
},
ugly: {
src: 'beautiful.js',
dest: 'ugly.js'
}
}
我用:
咕嚕--target =布拉布拉
傳遞參數,所以MYCONST應該從終端(輸入在這種情況下,布拉布拉)。我似乎無法找到一種方法來代替myConst(在代碼中)。這是可能的嗎?我該怎麼做?