-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tsx): Extract script and styles from TSX for language-server con…
…sumption (#1019) * feat(tsx): Extract script and styles from TSX for language-server consumption * feat: add options for styles * fix: reverse order of operation * test: fix * test: add tests * fix: count printed bytes so that we can skip over them later * chore: fix format * chore: uugh * chore: biome what is GOING on * fix(tsx): rework how escaping work (#1023) * fix(tsx): rework how escaping work * nit: remove duplicate code * nit: formatting * chore: changeset * fix: also do it for escaped text
- Loading branch information
1 parent
ed25fe0
commit 3e25858
Showing
8 changed files
with
486 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@astrojs/compiler": minor | ||
--- | ||
|
||
Adds two new options to `convertToTSX`: `includeScripts` and `includeStyles`. These options allow you to optionally remove scripts and styles from the output TSX file. | ||
|
||
Additionally this PR makes it so scripts and styles metadata are now included in the `metaRanges` property of the result of `convertToTSX`. This is notably useful in order to extract scripts and styles from the output TSX file into separate files for language servers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.