You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/playgrounds/demo/scripts/create-app-svelte.js

7 lines
276 B

import fs from 'node:fs';
const destination = new URL('../src/App.svelte', import.meta.url);
if (!fs.existsSync(destination)) {
const template = new URL('./App.template.svelte', import.meta.url);
fs.writeFileSync(destination, fs.readFileSync(template, 'utf-8'), 'utf-8');
}