remove dependence of create-svelte build on kit build
ADD
.changeset/smooth-shrimps-fly.md
+---
+'create-svelte': patch
+---
+
+Fix build so that the package can be automatically published

MODIFY
packages/create-svelte/cli/global.d.ts
packages/create-svelte/cli/global.d.ts
declare module 'prompts/lib/index';
declare module '*.json';
-
-// TODO make this depend on the real types from the kit package
-declare module '@sveltejs/kit/filesystem';

MODIFY
packages/create-svelte/cli/index.js
packages/create-svelte/cli/index.js
//eslint-disable-next-line import/no-unresolved
import fs from 'fs';
import path from 'path';
-import { mkdirp } from '@sveltejs/kit/filesystem'; // eslint-disable-line
import { bold, cyan, gray, green, red } from 'kleur/colors';
import prompts from 'prompts/lib/index';
import { fileURLToPath } from 'url';
@@ -219,4 +218,14 @@ function sort_keys(obj) {
return sorted;
}
+/** @param {string} dir */
+function mkdirp(dir) {
+ try {
+ fs.mkdirSync(dir, { recursive: true });
+ } catch (e) {
+ if (e.code === 'EEXIST') return;
+ throw e;
+ }
+}
+
main();

remove dependence of create-svelte build on kit build (#1001)