[英]grunt-contrib-jade unable to read file (EISDIR)
Executing grunt jade:dev
on this 在此执行grunt jade:dev
grunt.initConfig({
"jade": {
"dev": {
"files": {
"cwd": "src",
"src": ["**/*.jade"],
"dest": "dist",
"ext": ".html",
"expand": true
},
"options": {
"pretty": true,
"data": {
"environment": "dev"
}
}
},
"prod": {
"files": {
"cwd": "src",
"src": ["**/*.jade"],
"dest": "dist",
"ext": ".html",
"expand": true
},
"options": {
"pretty": true,
"data": {
"environment": "prod"
}
}
}
}
});
fails with 失败于
Warning: Unable to read "src" file (Error code: EISDIR). 警告:无法读取“ src”文件(错误代码:EISDIR)。 Use --force to continue. 使用--force继续。
But executing grunt jade
on this 但是在这上执行grunt jade
grunt.initConfig({
"jade": {
"files": {
"cwd": "src",
"src": ["**/*.jade"],
"dest": "dist",
"ext": ".html",
"expand": true
},
"options": {
"pretty": true,
"data": {
"environment": "dev"
}
}
}
});
succeeds. 成功。
There is no difference between the configuration of the tasks I'm running in both cases. 在两种情况下,我正在运行的任务的配置之间没有区别。 What am I missing? 我想念什么?
I don't know why, but this seems to work: 我不知道为什么,但这似乎可行:
grunt.initConfig({
"jade": {
"dev": {
"cwd": "src",
"src": ["**/*.jade"],
"dest": "dist",
"ext": ".html",
"expand": true,
"options": {
"pretty": true,
"data": {
"environment": "dev"
}
}
},
"prod": {
"cwd": "src",
"src": ["**/*.jade"],
"dest": "dist",
"ext": ".html",
"expand": true,
"options": {
"pretty": true,
"data": {
"environment": "prod"
}
}
}
}
});
All I did was remove the enclosing "files"
object. 我所做的只是删除了封闭的"files"
对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.