0.3.0 • Published 11 months ago

@ptkdev/sveltekit-electron-adapter v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

sveltekit-electron-adapter logo

🤖 sveltekit-electron-adapter

v0.0.0 npm.io License: MIT Language: TypeScript Framework: Grammy ECMAScript: 2019 Discord Server

Adapter for SvelteKit apps that prerenders your entire site as a collection of static files for use with Electron. Create your desktop apps with SvelteKit and Electron.

This is a fork of official sveltekit-static-adapter

🎁 Support: Donate

This project is free, open source and I try to provide excellent free support. Why donate? I work on this project several hours in my spare time and try to keep it up to date and working. THANK YOU!

Donate Paypal Donate Ko-Fi Donate GitHub Sponsors Donate Patreon Donate Bitcoin Donate Ethereum

📎 Menu

💡 Features

👔 Screenshot

sveltekit-electron-adapter

🚀 Setup

  1. Create new SvelteKit Project
  2. Install this adapter npm install @ptkdev/sveltekit-electron-adapter --save-dev
  3. Edit svelte.config.js and replace default adapter with electron-adapter:
import adapter from "@ptkdev/sveltekit-electron-adapter";

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter({
			strict: true,
		}),
	},
};
  1. Run npm run build (⚠️ IMPORTANT: Only pages with export const prerender = true; are supported)
  2. Create new Electron Forge Project
  3. Copy build content from sveltekit project and paste in src folder of electron forge project
  4. Run Electron project with npm run start or generate binary with npm run make

I make a boilerplate that "automate" this process, but is working in progress: check this repo.

🧰 Options

The adatper({ options }) parameters list:

ParameterDescriptionValuesDefault valueAvailable since
pagesSee official docs
assetsSee official docs
fallbackSee official docs
precompressSee official docs
strictSee official docs
policySet meta-tag content-security-policyStringdefault-src 'self'; script-src 'self'v0.2.0
viewportSet meta-tag viewportStringwidth=device-width, initial-scale=1.0, viewport-fit=coverv0.2.0

Example:

const config = {
	kit: {
		adapter: adapter({
			strict: true,
			policy: "",
			viewport: `width=device-width`,
		}),
	},
};

📚 Documentation

Run npm run docs

👑 Backers and Sponsors

Thanks to all our backers! 🙏 Donate 3$ or more on paypal, ko-fi, github or patreon and send me email with your avatar and url.

npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io

👨‍💻 Contributing

I ❤️ contributions! I will happily accept your pull request! (IMPORTANT: Only to nightly branch!) Translations, grammatical corrections (GrammarNazi you are welcome! Yes my English is bad, sorry), etc... Do not be afraid, if the code is not perfect we will work together 👯 and remember to insert your name in .all-contributorsrc and package.json file.

Thanks goes to these wonderful people (emoji key):

💰 In the future, if the donations allow it, I would like to share some of the success with those who helped me the most. For me open source is share of code, share development knowledges and share donations!

🦄 Other Projects

npm.io

npm.io npm.io npm.io npm.io npm.io npm.io

npm.io npm.io npm.io

npm.io npm.io npm.io npm.io npm.io npm.io npm.io npm.io

💫 License

  • Code and Contributions have MIT License
  • Images and logos have CC BY-NC 4.0 License
  • Documentations and Translations have CC BY 4.0 License
Copyleft (c) 2022 Patryk Rzucidło (@PTKDev) [support@ptkdev.io](mailto:support@ptkdev.io)
0.3.1-nightly.98

12 months ago

0.3.1-nightly.109

11 months ago

0.3.1-nightly.97

12 months ago

0.3.1-nightly.99

12 months ago

0.3.1-nightly.106

11 months ago

0.3.1-nightly.94

12 months ago

0.3.1-nightly.105

11 months ago

0.3.1-nightly.93

12 months ago

0.3.1-nightly.108

11 months ago

0.3.1-nightly.96

12 months ago

0.3.1-nightly.107

11 months ago

0.3.1-nightly.95

12 months ago

0.3.1-nightly.102

12 months ago

0.3.1-nightly.90

12 months ago

0.3.1-nightly.101

12 months ago

0.3.1-nightly.104

11 months ago

0.3.1-nightly.92

12 months ago

0.3.1-nightly.103

12 months ago

0.3.1-nightly.91

12 months ago

0.3.1-nightly.100

12 months ago

0.3.1-nightly.87

12 months ago

0.3.1-nightly.86

12 months ago

0.3.1-nightly.89

12 months ago

0.3.1-nightly.88

12 months ago

0.3.1-nightly.117

11 months ago

0.3.1-nightly.116

11 months ago

0.3.1-nightly.119

11 months ago

0.3.1-nightly.85

12 months ago

0.3.1-nightly.118

11 months ago

0.3.1-nightly.84

12 months ago

0.3.1-nightly.113

11 months ago

0.3.1-nightly.112

11 months ago

0.3.1-nightly.115

11 months ago

0.3.1-nightly.114

11 months ago

0.3.1-nightly.111

11 months ago

0.3.1-nightly.110

11 months ago

0.3.1-nightly.128

11 months ago

0.3.1-nightly.127

11 months ago

0.3.1-nightly.124

11 months ago

0.3.1-nightly.123

11 months ago

0.3.1-nightly.126

11 months ago

0.3.1-nightly.125

11 months ago

0.3.1-nightly.120

11 months ago

0.3.1-nightly.122

11 months ago

0.3.1-nightly.121

11 months ago

0.3.1-nightly.9

1 year ago

0.3.1-nightly.8

1 year ago

0.3.1-nightly.7

1 year ago

0.3.1-nightly.6

1 year ago

0.3.1-nightly.5

1 year ago

0.3.1-nightly.4

1 year ago

0.3.1-nightly.3

1 year ago

0.3.1-nightly.2

1 year ago

0.3.1-nightly.1

1 year ago

0.3.0

1 year ago

0.3.0-beta.1

1 year ago

0.2.2

1 year ago

0.2.2-beta.1

1 year ago

0.2.1

1 year ago

0.0.0-beta.1

1 year ago

0.0.0

1 year ago

0.1.0

1 year ago