-
Notifications
You must be signed in to change notification settings - Fork 19
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
Unable to get working #1
Comments
could you provide a sample component to reproduce this? |
It's a private code base so can't share, but the issues are very standard which would be easy to recreate. Examples: Could you add an example to this project which outputs errors? Any basic component with basic typescript errors in the template would be enough. Regards |
@goldingdamien I have added a simple test. A component like this: https://github.com/Yuyz0112/vue-type-check/blob/master/tests/fixture/ComponentOne.vue will have the typescript errors like this: https://github.com/Yuyz0112/vue-type-check/blob/master/tests/component.spec.js#L12 |
I tried executing but couldn't get the test to pass.
Regards. |
yes |
I'm on Windows and after debugging I found, that it has to do how the paths are constructed. In In a custom copy I changed it to file:/// and it works (at least with absolute paths). Here's the code: function walk(dir) {
fs.readdirSync(dir).forEach(p => {
const joinedP = path.join(dir, p);
const stats = fs.statSync(joinedP);
if (stats.isDirectory()) {
walk(joinedP);
}
else if (path.extname(p) === ".vue") {
var newPath = `file://${joinedP}`.replace(/\\/g, "/");
if (process.platform == "win32") {
if (joinedP.length>1 && joinedP[1] == ':') {
newPath = `file:///${joinedP}`.replace(/\\/g, "/");
} else {
newPath = `file:///${process.cwd()}/${joinedP}`.replace(/\\/g, "/");
}
}
docs.push(vscode_languageserver_1.TextDocument.create(newPath.toLowerCase(), "vue", 0, fs.readFileSync(joinedP, "utf8")));
}
});
} |
I have a project that is open in VS code that has the Vetur extension working with interpolation is showing errors in various templates.
I am executing vue-type-check with "vtc --workspace ./" in the command line but nothing is being returned. It is the same if I include --srcDir ./path/to/nested/component.
Please provide some further information and/or a test example that should work.
Regards
The text was updated successfully, but these errors were encountered: