我试图更新应用程序以支持节点-v 7.7.3。但是,当我运行繁重的任务dom_munger按如下:Dom_munger问题与节点7.7.3 - 路径必须是字符串
dom_munger:{
read: {
options: {
read:[
{selector:'script[data-concat!="false"]',attribute:'src',writeto:'appjs', isPath: true},
{selector:'link[rel="stylesheet"][data-concat!="false"]',attribute:'href',writeto:'appcss'}
]
},
src: 'app/index.html'
}
}
我收到错误:
Warning: Path must be a string. Received [ 'app/index.html' ] Use --force to continue.
我不知道是否有改写上述咕噜任务的方式,或者有可能是一个很好的替代dom_munger。任何帮助,将不胜感激。
谢谢你!但是,如果Grunt和Index位于相同的文件夹结构中,这似乎只能工作。我的结构是这样的: - /应用 -index.html - gruntfile.js 而如果没有属性“isPath”的dom_munger会找JS文件在同一目录中,其中Gruntfile的地方。 – sandrasvensson
@sandrasvensson但你有没有尝试删除'isPath'属性?它似乎解决了[这个类似的问题](https://github.com/cgross/grunt-dom-munger/issues/42)。 –