0
나는 대상 파일의 여러 배열을 설정할 수 있습니다 Grunt 작업 대상 배열?
task:{
target:{
files:[
{
expand:true,
cwd:'client/',
dest:'server/',
src:[
'scripts/**/*.js',
'styles/**/*.css',
'images/**'
]
},
{
expand:true,
cwd:'client/assets/',
src:'**/*',
dest:'server/'
}
]
}
}
는 이제 대상으로 동일한 작업을 수행합니다. 이처럼
:
task:{
server:[
{
options:{
…
},
files:{
…
}
},
{
options:{
…
},
files:{
…
}
}
]
}
하지만이 그런트 작동하지 않습니다 : 어떻게
Warning: Object #<Object> has no method 'indexOf' Use --force to continue.
할 수 있습니까?
는 지금은 같은 수행이 방식을 사용
task:{
server_<subtask_one>:{
options:{
…
},
files:{
…
}
},
server_<subtask_second>:{
options:{
…
},
files:{
…
}
}
}
을 그러나 각 하위 작업에 작업 접두사를 반복 한 다음이 같은 별도의 라인으로 그들을 실행하는 편리한되지 않습니다 :
'dataSeparator:<target>_<subtask_one>',
'dataSeparator:<target>_<subtask_second>',
나는 이미 알고 있습니다. 명확성을 가져 주셔서 감사합니다. –