Skip to content

Commit

Permalink
feat: nx support (#231)
Browse files Browse the repository at this point in the history
* fix: debugging not hitting breakpoints

* feat: add new nx sample

* fix: rename vite root config to avoid interference with local sample configs

* chore: bump vitest for sample projects to support new workspace option

* docs: update README

* fix: lockfile
  • Loading branch information
ffMathy authored Feb 18, 2024
1 parent f64a8ab commit 15f430a
Show file tree
Hide file tree
Showing 44 changed files with 15,606 additions and 2,121 deletions.
10 changes: 10 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"name": "Run Extension Monorepo NX",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/samples/monorepo-nx"
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"name": "Run Extension React Sample",
"type": "extensionHost",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Features

- Run/debug vitest tests in vscode
- NX support (see the [NX sample](./samples/monorepo-nx/))
- Watch mode is supported 🎊. Test reruns are blazing fast

![Watch Mode](https://i.ibb.co/YRhJj9f/Screen-Recording-2022-05-21-at-20-09-20.gif)
Expand All @@ -31,6 +32,7 @@

- `vitest.enable`: This plugin will try to detect whether the current project is
set up with Vitest to activate itself. If detection fails, you can enable the plugin manually.
- `vitest.watchOnStartup`: Whether to activate Watch mode per default when the extension starts.
- `vitest.nodeEnv`: The env passed to runner process in addition to
`process.env`
- `vitest.commandLine`: The command line to start vitest tests. **It should have with the ability
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"vscode:prepublish": "yarn run compile",
"compile": "tsup ./src/extension.ts --external vscode,lightningcss,esbuild --minify",
"watch": "tsup ./src/extension.ts --external vscode,lightningcss,esbuild --watch --sourcemap",
"test": "vitest run",
"test": "vitest run --config vite.global-config.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/monorepo-no-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"happy-dom": "^2.49.0",
"vitest": "^0.12.0"
"vitest": "^1.3.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
Loading

0 comments on commit 15f430a

Please sign in to comment.