Open devjume opened 4 months ago
This PR will add prestart and postart as adapter options and pass them them to generated package.json
prestart
postart
package.json
Example use cases:
bun:sqlite
mkdir ./database/
npm Docs - prestart & poststart
Example how to use:
// svelte.config.js import adapter from "svelte-adapter-bun"; const config = { kit: { adapter: adapter({ prestart: "mkdir ./database", poststart: "echo 'poststart'", }) } };
// generated package.json in build folder "scripts": { "prestart": "mkdir ./database", "poststart": "echo 'poststart'", "start": "bun ./index.js" },
This PR will add
prestart
andpostart
as adapter options and pass them them to generatedpackage.json
Example use cases:
bun:sqlite
I want to save sqlite database on it's own folder. Withprestart
script I can runmkdir ./database/
automatically.prestart
user can run migration scripts before starting production version of sveltekit app.npm Docs - prestart & poststart
Example how to use: