Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提取依赖时jsParser::getFileInfo路径问题导致无法正常提取依赖 #106

Open
zwlijun opened this issue Feb 26, 2016 · 0 comments

Comments

@zwlijun
Copy link

zwlijun commented Feb 26, 2016

配置如下:
conf["transport"] = {
"expand": {
"options": {
"debug": false,
"paths": [
doc + src + "js" // /data/wwwroot/htdocs/src/js
]
},
"files": [
{
"expand": true,
"cwd": doc + src + transportTempDir + "/js", // /data/wwwroot/htdocs/src/transport/js
"src": "*/.js",
"dest": doc + src + transportTempDir + "/js" // /data/wwwroot/htdocs/src/transport/js
}
]
}
};

执行grunt时,无法提取依赖,原因:
jsParser#L34::var file = getFileInfo(path.join(process.cwd(), fileObj.src));
这里join了 process.cwd() 引起的,导致在src前面自动加上了构建工具当前目录。这样子变成了
/data/builder/app/data/wwwroot/htdocs/...

临时解决方案:
jsParser#L34::var file = getFileInfo(fileObj.src);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant