Skip to content

Commit

Permalink
Merge pull request #192 from williamsyang-work/fix-yarn-watch-script
Browse files Browse the repository at this point in the history
Fix 'yarn watch' Script
  • Loading branch information
marcdumais-work authored Jan 26, 2024
2 parents 77ecfef + c6e912e commit 3e337a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ ln -s <vscode-trace-extension root>/vscode-trace-extension-x.x.x.vsix ./

## Developing the extension

When having to modify the code of the extension (in the `vscode-trace-extension` folder), one can simply run the `yarn` command. It is also possible to watch for changes to have no manual steps to do before re-running the extension: `yarn watch` or `ctrl-shift-b` and select the task `npm: watch - vscode-trace-extension`.

For changes in the webview part (in the `vscode-trace-webviews` folder), you can run the `yarn` command, simply re-opening a trace should show the changes. It is also possible to watch for changes with `yarn watch` or `ctrl-shift-b` and selecting the task `npm: watch - vscode-trace-webviews`.
From the root directory execute `yarn run watch`. This will watch and bundle `vscode-trace-common`, `vscode-trace-extension`, and `vscode-trace-webviews`. All outputs will be in one terminal. Changes can be observed and tested in the `Extension Development Host` by pressing `F5`.

For more information about `VsCode WebView API` see [here][vscode-webview].

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"prepare": "lerna run prepare",
"watch": "lerna run watch",
"watch": "lerna exec --stream --parallel -- \"yarn run watch\"",
"clean": "lerna run clean",
"vsce:package": "lerna run vsce:package",
"lint": "lerna run lint",
Expand Down
3 changes: 2 additions & 1 deletion vscode-trace-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@
"vscode:prepublish": "yarn prepare && yarn run webpack:production",
"vsce:package": "vsce package --yarn",
"vsce:ls": "vsce ls --yarn",
"watch": "tsc -w -p tsconfig.json",
"tswatch": "tsc -w -p tsconfig.json",
"watch": "yarn run webpack-dev",
"lint": "eslint .",
"format:write": "prettier --write ./src",
"format:check": "prettier --check ./src"
Expand Down

0 comments on commit 3e337a7

Please sign in to comment.