chore: use parse
& print
from svelte/compiler
tailwindcss
2.3.10
+layout.svelte
shouldn't be touched
recast is using babel, which is much less used in the Svelte ecosystem, so folks wouldn't generally be as familiar with it
Closes #94 Closes svelte-add/svelte-add#193 Closes svelte-add/svelte-add#507
This is a pretty rough poc to try and make sv
work better with .svelte
files. Under the hood, this uses svelte-ast-print
Step 1 (support for svelte files):
@attach
, self closing component tags, transitions, etc)parseSvelte
svelte-ast-print
support indentation and quote styles (I think some of that already works)svelte-ast-print
(first write up: xeho91/js-ast#128)Step 2 (reduce deps, different pr probably)
svelte/compiler
and svelte-ast-print
. Check which hoops we need to jump to make that happen. We could potentially drop the following deps:
Latest commit: ede290f
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
npx https://pkg.pr.new/sveltejs/cli/sv@568
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@568
commit: ede290f