···11+# Svelte library
22+33+Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
44+55+Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
66+77+## Creating a project
88+99+If you're seeing this, you've probably already done this step. Congrats!
1010+1111+```sh
1212+# create a new project in the current directory
1313+npx sv create
1414+1515+# create a new project in my-app
1616+npx sv create my-app
1717+```
1818+1919+## Developing
2020+2121+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
2222+2323+```sh
2424+npm run dev
2525+2626+# or start the server and open the app in a new browser tab
2727+npm run dev -- --open
2828+```
2929+3030+Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
3131+3232+## Building
3333+3434+To build your library:
3535+3636+```sh
3737+npm pack
3838+```
3939+4040+To create a production version of your showcase app:
4141+4242+```sh
4343+npm run build
4444+```
4545+4646+You can preview the production build with `npm run preview`.
4747+4848+> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
4949+5050+## Publishing
5151+5252+Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
5353+5454+To publish your library to [npm](https://www.npmjs.com):
5555+5656+```sh
5757+npm publish
5858+```
···11+<h1>Welcome to your library project</h1>
22+<p>Create your package using @sveltejs/package and preview/showcase your work with SvelteKit</p>
33+<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
···11+import adapter from '@sveltejs/adapter-auto';
22+import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
33+44+/** @type {import('@sveltejs/kit').Config} */
55+const config = {
66+ // Consult https://svelte.dev/docs/kit/integrations
77+ // for more information about preprocessors
88+ preprocess: vitePreprocess(),
99+1010+ kit: {
1111+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1212+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
1414+ adapter: adapter()
1515+ }
1616+};
1717+1818+export default config;