Grunt JS复制到网络位置
问题描述:
我想使用grunt-contrib-copy(或任何其他咕噜复制插件)将文件复制到网络位置。
I want to use grunt-contrib-copy (or any other grunt copying plugin) to copy files to network location.
尝试以下操作:
copy: {
test: {
files: [
{ src: ['Scripts/*'], dest: ['\\\\location\\site\\Scripts\'] }
]
}
}
但获取:
警告: \\location\site\Scripts\文件(Err
或代码:undefined)。
是否可以/如何复制到网络位置?
Is it possible / How to copy to network location?
答
是的,它很简单,只需用斜杠定义你的路径:
Yes, it's quite simple to do, just define your path with forward slashes:
copy: {
test: {
files: [
{ src: ['Scripts/*'], dest: ['//location/site/Scripts/'] }
]
}
}
好的,咕噜会照顾的。试试看。
This will work on windows as-well, grunt will take care of that. Try it out.