10000 chore: use `parse` & `print` from `svelte/compiler` by manuel3108 · Pull Request #568 · sveltejs/cli · GitHub
[go: up one dir, main page]

Skip to content

chore: use parse & print from svelte/compiler #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use print (local svelte & esrap setup required)
  • Loading branch information
manuel3108 committed Jun 21, 2025
commit e67665644650d1d0f8b107e5b673c142e2a34f27
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
],
"overrides": {
"svelte": "link:..\\..\\..\\svelte\\packages\\svelte"
}
}
}
1 change: 0 additions & 1 deletion packages/addons/paraglide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export default defineAddon({

// add usage example
sv.file(`${kit.routesDirectory}/demo/paraglide/+page.svelte`, (content) => {
console.log(content);
const { ast, generateCode } = parseSvelte(content);

let scriptAst = ast.instance?.content;
Expand Down
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@
"dom-serializer": "^2.0.0",
"domhandler": "^5.0.3",
"domutils": "^3.2.2",
"esrap": "^1.4.9",
"esrap": "https://pkg.pr.new/sveltejs/esrap@a275a5c",
"htmlparser2": "^9.1.0",
"magic-string": "^0.30.17",
"picocolors": "^1.1.1",
"postcss": "^8.5.6",
"silver-fleece": "^1.2.1",
"zimmerframe": "^1.1.2",
"svelte": "^5.30.2",
"svelte-ast-print": "^1.0.1"
"zimmerframe": "^1.1.2"
},
"keywords": [
"create",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/tooling/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import * as fleece from 'silver-fleece';
import { print as esrapPrint } from 'esrap';
import * as acorn from 'acorn';
import { tsPlugin } from '@sveltejs/acorn-typescript';
import { parse as svelteParse, type AST as SvelteAst } from 'svelte/compiler';
import { print as sveltePrint } from 'svelte-ast-print';
import { parse as svelteParse, type AST as SvelteAst, print as sveltePrint } from 'svelte/compiler';

export {
// html
Expand Down
Loading
Loading
0