0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-25 09:09:35 +01:00
svelte/playgrounds/basic/compile.js
2023-08-22 15:00:33 -07:00

7 lines
182 B
JavaScript

import { readFileSync } from 'node:fs';
import { compile } from '../svelte/src/compiler/index.js';
const code = readFileSync('src/App.svelte', 'utf8');
console.log(compile(code));