* Fix bootability of VSCode with Razor dev assets.
- Updated launch.json and tasks.json to not be platform specific. As part of this it does add the requirement that VSCode is booted via an activated command line (this is what we require for VS anyhow).
- Moved the debugging extension from eslint -> tslint so that it's consistent with the rest of the VSCode projects. Updated the corresponding files to reflect the tslint requirements.
- Added an npmproj for the debugging extension so that it can be built transitively when trying to run VSCode
Part of dotnet/aspnetcore#30834
* Only activate on linux
- In VSCode only (F5) you are now prompted with a test file filter that will be applied to the entire list of functional tests.
- This does not impact command line runs.
dotnet/aspnetcore#17045
- In order to programatically parse anything with the Razor grammar we need to reconstruct an environment that's similar to VSCode where grammar's for C#, HTML, JavaScript and CSS exist. To do this I grabbed all of Razor's embedded language grammars to ensure we can construct a valid Razor TextMate grammar parser.
- Copied existing unit test boiler plate (jest.config.js etc.) to a new `Microsoft.AspNetCore.Razor.VSCode.Grammar.Test` project.
- Added VSCode utilities to enable running and debugging of grammar tests directly in Visual Studio code.
- Built test utilities to:
1. Tokenize a content with Razor's grammar.
2. Generate snapshot contents (a serialized form of tokenized content).
- Used Jest's [built-in snapshot testing](https://jestjs.io/docs/en/snapshot-testing) to build a simple testing suite that Tokenizes Razor content -> Serializes it -> Compares it to a baseline (or updates).
- Ensured that command line testing works as expected as well via `yarn jest` to run tests and `yarn jest -u` to update snapshots for tests.
- Added an escaped transitions grammar test as an example to show how all future tests will be constructed.
aspnet/AspNetCore#14287
- With this change there's no reason to repeatedly run the VSCode extension. Instead you can make changes in the library and then just ctrl + r to reload the experimental instance and see the changes.
- VSCode's tasks support is limited when it comes to background commands (npm watch) because it typically will wait for a command to exit. Due to its limitations a background task must be the top level task that is called so that it's the "last" task that's in the pipeline; this way VSCode knows when to do the final launch command. In our case this means I had to add a `WatchLibraryAndCompileExtension` that in the background watched the library and then dependently compiled the extension (can't do both).
- Added the `.vscode-test` to `.gitignore` because that's the VSCode folder that gets created when dynamically downloading VSCode for CI purposes.
- Migrated functional tests to use the non-deprecated VSCode functional testing APIs. This involved creating a runTest file to control downloading VSCode and passing in appropriate parameters as well as creating an index that discovers tests that should be run.
- Changed functional tests to operate on the existing Razor testapps (instead of the old ones).
- Updated the "default" completion tests to be latest Razor/Blazor.
- Added VSCode launch configurations to enable easy debugging via F5.
aspnet/AspNetCore#13494
- For simplicity put the unit tests in the test folder to align with all other types of test projects.
- Converted unit tests to use `yarn` and `jest`.
- Added a `Run Unit Tests` launch configuration so we can F5 in VSCode to easily debug Razor VSCode unit tests.
- Hooked new npmproj test projects into the build.
aspnet/AspNetCore#13494
- This changeset adds the following:
- src/Razor/src/Microsoft.AspNetCore.Razor.VSCode - Razor VSCode extension library
- src/Razor/src/Microsoft.AspNetCore.Razor.VSCode.Extension - Razor VSCode extension bootstrapper
- Added a `README.md` into the `Microsoft.AspNetCore.Razor.VSCode.Extension` to describe its purpose.
- Moved old Razor VSCode project bits from `npm` to `yarn`
- Added a global .vscode folder to allow having VSCode open at AspNetCore-Tooling root yet still be able to ctrl + f5 the extension
- Expanded the bootstrapper extension project (`Microsoft.AspNetCore.Razor.VSCode.Extension`) to have new commands to make working with projects in experiemental instances easy. Prior to this we relied on a node.js script that were unsupported to magically wire things together. As part of the merging of this repo I had to find an alternate route to do that.
- Added a Razor global tslint file which each VSCode project inherits from
- Added a Razor global tsconfig file which each VSCode project inherits from
- Updated npmproj's to ensure build incrementalism works.
aspnet/AspNetCore#13494