Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chunyu3 committed Dec 18, 2024
1 parent 86372ee commit b121717
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 40 deletions.
3 changes: 0 additions & 3 deletions packages/typespec-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,6 @@
"test:e2e": "pnpm test:web",
"test:web": "vscode-test-web --extensionDevelopmentPath=. --headless --extensionTestsPath=dist/test/web/suite.js ./test/web/data"
},
"dependencies": {
"@typespec/compiler": "workspace:~"
},
"devDependencies": {
"@rollup/plugin-commonjs": "~28.0.0",
"@rollup/plugin-node-resolve": "~15.3.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/typespec-vscode/src/task-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { resolve } from "path";
import vscode, { workspace } from "vscode";
import { Executable } from "vscode-languageclient/node.js";
import { StartFileName } from "./const.js";
import logger from "./log/logger.js";
import { normalizeSlashes } from "./path-utils.js";
import { resolveTypeSpecCli } from "./tsp-executable-resolver.js";
Expand All @@ -11,13 +12,13 @@ export function createTaskProvider() {
provideTasks: async () => {
logger.info("Providing tsp tasks");
const targetPathes = await vscode.workspace
.findFiles("**/main.tsp", "**/node_modules/**")
.findFiles(`**/${StartFileName}`, "**/node_modules/**")
.then((uris) =>
uris
.filter((uri) => uri.scheme === "file" && !uri.fsPath.includes("node_modules"))
.map((uri) => normalizeSlashes(uri.fsPath)),
);
logger.info(`Found ${targetPathes.length} main.tsp files`);
logger.info(`Found ${targetPathes.length} ${StartFileName} files`);
const tasks: vscode.Task[] = [];
for (const targetPath of targetPathes) {
tasks.push(...(await createBuiltInTasks(targetPath)));
Expand Down
69 changes: 34 additions & 35 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b121717

Please sign in to comment.