Skip to content

Commit d2ce621

Browse files
authored
feat: add support for new SvelteKit's routing system convention (#131)
1 parent 11508da commit d2ce621

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

update.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ const base = {
334334
'*.java': '$(capture).class',
335335
'.project': '.classpath',
336336
}
337+
// Based on the new SvelteKit's routing system https://kit.svelte.dev/docs/routing
338+
const svelteKitRouting = {
339+
'+page.svelte': '+page.server.ts,+page.server.js,+page.ts,+page.js ',
340+
'+layout.svelte':'+layout.ts,+layout.ts,+layout.js,+layout.server.ts,+layout.server.js'
341+
}
337342

338343
function stringify(items) {
339344
return Array.from(new Set(items)).sort().join(', ')
@@ -366,6 +371,7 @@ const full = sortObject({
366371
'*.tex': stringify(tex),
367372
"deno.json*": stringify(denoRuntime),
368373
...Object.fromEntries(Object.entries(frameworks).map(([n, i]) => [n, stringify([...i, ...libraries])])),
374+
...svelteKitRouting
369375
})
370376

371377
const today = new Date().toISOString().slice(0, 16).replace('T', ' ')

0 commit comments

Comments
 (0)