【发布时间】:2016-01-06 12:50:33
【问题描述】:
在配置我的任务时,我想使用当前文件名,该任务在任务options 对象中作为模板变量工作。例如在options['wrap-start'] 这里:
swig_compile: {
temptarget: {
options: {
'wrap-start': 'var <%= CURRENT.FILE.NAME %> = function {', //I want the current file name as function name here
'wrap-end': '};'
},
files: {
'<%= config.app %>/scripts/tempcompiled.js': ['<%= config.app %>/templates/*.swig']
}
}
}
【问题讨论】:
标签: gruntjs