0.0.2 • Published 11 months ago
@fleek-platform/svelte-adapter v0.0.2
⚡️ SvelteKit Adapter for Fleek
SvelteKit adapter that builds your app to run on Fleek Functions. This adapter automatically handles building and preparing your SvelteKit app for deployment on Fleek's infrastructure.
Installation
npm install -D @fleek-platform/svelte-adapterUsage
Add the adapter to your svelte.config.js:
import adapter from '@fleek-platform/svelte-adapter';
export default {
kit: {
adapter: adapter({
// optional configuration
outDir: '.fleek', // Defaults to '.fleek'
}),
},
};Configuration Options
outDir: File path to output the production build. Defaults to.fleekif not specified.
Build Output
When you run npm run build, this adapter will:
- Create a production build of your SvelteKit app
- Generate static assets in
.fleek/static - Bundle your server-side functions into
.fleek/dist
Deployment
Once built, deploy to Fleek Functions with:
fleek functions deploy --bundle=false --path .fleek/dist/index.js --assets .fleek/staticNotes
- Make sure you have the Fleek CLI installed and configured
- This adapter automatically handles:
- Static asset serving through IPFS
- Pre-rendered pages
- Server-side rendering
- Client/server routing
- TypeScript support
- Base path configuration
Support
- Node.js 18.x and later
- SvelteKit 2.0 and later
Release Process
This project follows SemVer for versioning. Here's how to release a new version:
- Update Version Number: Bump the version number in package.json using npm version (patch/minor/major). This will update the version number in package.json and create a new Git tag.
pnpm version patch- Push Changes and Tags
git push origin main --follow-tags- GitHub Actions Automation: A GitHub Actions workflow automatically publishes the package to npm when a new tag is pushed.
Contributing
Thanks for considering contributing to our project!
How to Contribute
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name. - Make your changes.
- Commit your changes using conventional commits.
- Push to your fork and submit a pull request.
Commit Guidelines
We use Conventional Commits for our commit messages:
test: 💍 Adding missing testsfeat: 🎸 A new featurefix: 🐛 A bug fixchore: 🤖 Build process or auxiliary tool changesdocs: ✏️ Documentation only changesrefactor: 💡 A code change that neither fixes a bug or adds a featurestyle: 💄 Markup, white-space, formatting, missing semi-colons...
0.0.2
11 months ago