@swarmakit/sveltekit
v0.0.8
Published
<div style="text-align: center;">
Readme
create-svelte
Everything you need to build a Svelte project, powered by create-svelte.
Creating a project
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-appDeveloping
Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openBuilding
To create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.
Installation
Install the @swarmakit/sveltekit library through npm:
npm install @swarmakit/sveltekitPrerequisites
Node.js and npm should be installed. You can verify installation with:
node -v
npm -v Importing Components and Basic Usage in Svelte
Import Components: To use a component in your Svelte files, import it from the
@swarmakit/sveltekitlibrary as shown below:<script> import { ComponentName } from '@swarmakit/sveltekit' </script>Example Usage in a Svelte File: Use the imported component within your Svelte file:
<script> import { ComponentName } from '@swarmakit/svelte'; const exampleProp = "Example text"; </script> <main> <ComponentName propName={exampleProp} /> </main>
Available Components: Swarmakit Sveltekit includes a vast library of components. See the full list in the components folder on GitHub.
