Sveltekit + Tauri Template

Overview

Skitty

Template for building SvelteKit + Tauri (Skitty)

Warning

This project is supposed to be used temporary only (until svelte-add tauri has finished). Consider checking svlete-add before continue.

Table of contents

Developing

$ git clone https://github.com/Mattchine/skitty <your path>
$ cd <your path>
$ yarn tauri dev

Configure / Step-by-step guide

  1. Create project with svelte-add
$ npm init @svelte-add/kit@latest
# Follow the prompts to select the integrations you want
  1. Add Tauri to your project
$ cd <your path>
$ yarn add -D @tauri-apps/cli
$ yarn add @tauri-apps/api
  1. Disable SvelteKit SSR (I have problem with this for days, thanks to jsmenzies)
  • 3.1 Create src/hook.ts
  /** @type {import('@sveltejs/kit').Handle} */
  export async function handle({ event, resolve }) {
    return await resolve(event, {
      ssr: false
    });
  }
  • 3.2 Add hook.ts to svelte.config.js
  kit: {
    files: {
	    hooks: 'src/hooks.ts'
	  }
  }
  1. Change tauri config src-tauri/tauri.conf.json
  • 4.1 Change devPath from PORT 8080 PORT 3000
  • 4.2 Set beforeDevCommand and beforeBuildCommand
  "build": {
    "distDir": "../public",
    "devPath": "http://localhost:3000",
    "beforeDevCommand": "yarn dev",
    "beforeBuildCommand": "yarn build"
  },
  1. Done! now you can run
  $ yarn tauri dev

Notes

  • This repository is for my future self and hope it would help someone out there too.

Special Thanks

  • jsmenzies
  • svelte-add
  • And, of course, all underlying project: Svelte, SvelteKit, Taiilwind, Tauri, and many mores!.
You might also like...

A set of tools, helping you building efficient apps in a fast way. SvelteKit & GraphQL

A set of tools, helping you building efficient apps in a fast way. >> SvelteKit & GraphQL <<

KitQL KitQL, A set of tools, helping you building efficient apps in a fast way. 🌐 Infos Documentation: https://kitql.vercel.app/ Day by day progress,

Dec 27, 2022

Simple starter for SvelteKit with Tailwind CSS already set up and ready to go.

Get Started Simple Sveltekit boilerplate with Tailwind CSS already set up. Just run npm install to download the dependencies. Info I use Tailwind in p

Dec 23, 2022

Scaffold a full-stack SvelteKit application with tRPC and WindiCSS out of the box

create-sweet-app Interactive CLI to quickly set up an opinionated, full-stack, typesafe SvelteKit project. Inspired by the T3 Stack and create-t3-app

Dec 16, 2022

sveltekit + turborepo + histoire in a turborepo

sveltekit + turborepo + histoire in a turborepo

swyx's SvelteKit monorepo starter This is my starter for a monorepo with 2022 tech: SvelteKit Turborepo Histoire pnpm - brew install pnpm Demo Proof t

Nov 25, 2022

Quick T3 Stack with SvelteKit for rapid deployment of highly performant typesafe web apps.

Quick T3 Stack with SvelteKit for rapid deployment of highly performant typesafe web apps.

create-t3svelte-app Just Build npx create-t3svelte-app Outline Get Building npm yarn More Info 🛠 Early Version Note Prisma Requirements Available Tem

Dec 26, 2022

An example SvelteKit app implementing a simple authentication system.

An example SvelteKit app implementing a simple authentication system.

SvelteKit Auth Example An example SvelteKit app implementing a variety of authentication backends View the demo NOTE: this is very much a work in prog

Dec 30, 2022

A simple handle tap and hold action for Svelte/SvelteKit.

Svelte Tap Hold Minimalistic tap and hold component for Svelte/SvelteKit, see demo here. Installation // Using Yarn to install yarn add --dev svelte-t

Dec 8, 2022

Discord.js bot starter template, Slash Commands only (Raymond forced me to make a bot template)

boat-template Raymond forced me to make a bot template This template is meant is just for stupidness ig Getting Started Rename the config.example.ts t

Jan 5, 2022

Secure-electron-template - The best way to build Electron apps with security in mind.

Secure-electron-template - The best way to build Electron apps with security in mind.

secure-electron-template A current electron app template with the most popular frameworks, designed and built with security in mind. (If you are curio

Dec 29, 2022
Comments
  • Bump tauri from 1.0.3 to 1.0.6 in /src-tauri

    Bump tauri from 1.0.3 to 1.0.6 in /src-tauri

    Bumps tauri from 1.0.3 to 1.0.6.

    Release notes

    Sourced from tauri's releases.

    tauri v1.0.6

    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 457 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (446 crate dependencies)
    Crate:     ansi_term
    Version:   0.12.1
    Warning:   unmaintained
    Title:     ansi_term is Unmaintained
    Date:      2021-08-18
    ID:        RUSTSEC-2021-0139
    URL:       https://rustsec.org/advisories/RUSTSEC-2021-0139
    Dependency tree:
    ansi_term 0.12.1
    └── tracing-subscriber 0.3.15
        └── loom 0.5.6
            └── state 0.5.3
                └── tauri 1.0.6
                    ├── tauri 1.0.6
                    ├── restart 0.1.0
                    └── app-updater 0.1.0
    

    Crate: xml-rs Version: 0.8.4 Warning: unmaintained Title: xml-rs is Unmaintained Date: 2022-01-26 ID: RUSTSEC-2022-0048 URL: https://rustsec.org/advisories/RUSTSEC-2022-0048 Dependency tree: xml-rs 0.8.4 ├── winrt-notification 0.5.1 │ └── notify-rust 4.5.8 │ └── tauri 1.0.6 │ ├── tauri 1.0.6 │ ├── restart 0.1.0 │ └── app-updater 0.1.0 └── plist 1.3.1 └── tauri-codegen 1.0.4 ├── tauri-macros 1.0.4 │ └── tauri 1.0.6 └── tauri-build 1.0.4 └── app-updater 0.1.0

    warning: 2 allowed warnings found

    ... (truncated)

    Commits
    • e7af22c chore: only run publish for tauri
    • c89ed86 skip major git tag bump
    • 90e56c4 add publish-hotfix workflow
    • 0bd3a90 run covector version
    • bb17882 fix(endpoints/fs/readDir): don't read symlinks that are not allowed b… (#5123)
    • 679abc6 Apply Version Updates From Current Changes (#4701)
    • 9a8f8fc Revert "feat(updater): use full path to msiexec" (#4739)
    • f116ee6 feat(updater): use full path to msiexec (#4738)
    • 9af4313 fix(updater): escape MSI path (#4737)
    • 635f23b fix(bundler): correctly set debian architecture for aarch64 (#4700)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
  • Bump vite from 2.9.4 to 2.9.15

    Bump vite from 2.9.4 to 2.9.15

    Bumps vite from 2.9.4 to 2.9.15.

    Release notes

    Sourced from vite's releases.

    [email protected]

    Please refer to CHANGELOG.md for details.

    Changelog

    Sourced from vite's changelog.

    2.9.15 (2022-08-12)

    2.9.14 (2022-07-08)

    2.9.13 (2022-06-27)

    2.9.12 (2022-06-10)

    • fix: backport outdated optimized dep removed from module graph (#8534) (c0d6c60), closes #8534

    2.9.11 (2022-06-10)

    2.9.10 (2022-06-06)

    2.9.9 (2022-05-11)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump svelte from 3.47.0 to 3.49.0

    Bump svelte from 3.47.0 to 3.49.0

    Bumps svelte from 3.47.0 to 3.49.0.

    Changelog

    Sourced from svelte's changelog.

    3.49.0

    • Improve performance of string escaping during SSR (#5701)
    • Add ComponentType and ComponentProps convenience types (#6770)
    • Add support for CSS @layer (#7504)
    • Export CompileOptions from svelte/compiler (#7658)
    • Fix DOM-less components not being properly destroyed (#7488)
    • Fix class: directive updates with <svelte:element> (#7521, #7571)
    • Harden attribute escaping during SSR (#7530)

    3.48.0

    • Allow creating cancelable custom events with createEventDispatcher (#4623)
    • Support {@const} tag in {#if} blocks #7241
    • Return the context object in setContext #7427
    • Allow comments inside {#each} blocks when using animate: (#3999)
    • Fix |local transitions in {#key} blocks (#5950)
    • Support svg namespace for {@html} (#7002, #7450)
    • Fix {@const} tag not working inside a component when there's no let: #7189
    • Remove extraneous leading newline inside <pre> and <textarea> (#7264)
    • Fix erroneous setting of textContent for \<template> elements (#7297)
    • Fix value of let: bindings not updating in certain cases (#7440)
    • Fix handling of void tags in <svelte:element> (#7449)
    • Fix handling of boolean attributes in <svelte:element> (#7478)
    • Add special style scoping handling of [open] selectors on <dialog> elements (#7495)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump tauri from 1.0.6 to 1.0.8 in /src-tauri

    Bump tauri from 1.0.6 to 1.0.8 in /src-tauri

    Bumps tauri from 1.0.6 to 1.0.8.

    Release notes

    Sourced from tauri's releases.

    tauri v1.0.8

    Updating crates.io index

    Cargo Audit

    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
          Loaded 474 security advisories (from /home/runner/.cargo/advisory-db)
        Updating crates.io index
        Scanning Cargo.lock for vulnerabilities (452 crate dependencies)
    Crate:     xml-rs
    Version:   0.8.4
    Warning:   unmaintained
    Title:     xml-rs is Unmaintained
    Date:      2022-01-26
    ID:        RUSTSEC-2022-0048
    URL:       https://rustsec.org/advisories/RUSTSEC-2022-0048
    Dependency tree:
    xml-rs 0.8.4
    └── plist 1.3.1
        └── tauri-codegen 1.0.4
            ├── tauri-macros 1.0.4
            │   └── tauri 1.0.8
            │       ├── tauri 1.0.8
            │       ├── restart 0.1.0
            │       └── app-updater 0.1.0
            └── tauri-build 1.0.4
                └── app-updater 0.1.0
    

    warning: 1 allowed warning found

    [1.0.8]

    • Fix the filesystem scope allowing sub-directories of the directory picked by the dialog when recursive option was false.
      • f0602e7c Merge pull request from GHSA-6mv3-wm7j-h4w5 on 2022-12-22

    Cargo Publish

    Updating crates.io index
       Packaging tauri v1.0.8 (/home/runner/work/tauri/tauri/core/tauri)
       Verifying tauri v1.0.8 (/home/runner/work/tauri/tauri/core/tauri)
     Downloading crates ...
      Downloaded alloc-no-stdlib v2.0.4
      Downloaded futures-executor v0.3.25
      Downloaded http v0.2.8
      Downloaded typenum v1.16.0
      Downloaded waker-fn v1.1.0
      Downloaded xattr v0.2.3
      Downloaded rand_core v0.5.1
      Downloaded rand_pcg v0.2.1
      Downloaded brotli-decompressor v2.3.2
    </tr></table> 
    

    ... (truncated)

    Commits
    • 72389b0 Merge pull request from GHSA-6mv3-wm7j-h4w5
    • 4f2fd4d chore: run cargo fmt
    • cf09864 chore(cli): fix clippy warnings
    • d7ffa7f chore: addition to previous commit
    • 0150207 chore: fix clippy warnings
    • a02c6c4 chore(deps) Update Rust crate toml to 0.5.10 (#5836)
    • cd8c074 feat(cli): add support for Cargo's workspace inheritance for the package vers...
    • f7a080a fix(bench): Result interpretation problems (#5798)
    • bca09f7 feat(tauri-build): add option to specify Windows manifest, closes #5584 (#5730)
    • 2bf9c27 fix(ci): use client-payload input to trigger cli.js publish workflow
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies rust 
    opened by dependabot[bot] 0
Owner
null
A toolkit to rapidly scaffold out a new tauri-apps project using the framework of their choice.

create-tauri-app Component Version create-tauri-app About Tauri Tauri is a polyglot and generic system that is very composable and allows engineers to

Tauri 408 Jan 4, 2023
A dockerfile to build ARM cross-compiler for Tauri (React Typescript)

tauri-arm A dockerfile to build a ARM cross-compiler for Tauri(React Typescript Template). MacOS Windows 10 Linux Setup $ yarn Installation Please bu

Shih-Cheng Huang 10 Sep 6, 2022
A Tauri update server, hosted as a Cloudflare edge function

Tauri Update Server: Cloudflare One-Click Deploy Click the button above, let Cloudflare walk you through: it's easy! Go to your forked repository, edi

KilleenCode 33 Dec 14, 2022
Markdown note maker (with Git sync) using Tauri.

Mediocre Markdown note maker (with Git sync) using Tauri. Screens Tech Stack Frontend Monaco Editor for the editor interface Chakra UI library Redux T

Nilay Savant 14 Dec 6, 2022
A Bilibili Cross-Platform Desktop Client Powered By Tauri

BBHouse 取自常见的『我在B站买了房』的评论 BBHouse 是一款 哔哩哔哩 的第三方应用,基于 Tauri 跨平台构建,支持 Windows macOS Linux. 核心功能 一个支持对视频动态分区展示的首页, 去除了B博和推荐流 一个支持无限添加的 (临时的) 稍后播放列表与配套的播放

ziyu 151 Dec 26, 2022
An App for backing up and better displaying Onetab data Powered by Tauri.

Onetab Re 『Data is Priceless』 Onetab Re 是一款用于备份并原样展示Onetab数据的应用,基于 Tauri 跨平台构建,支持 Windows macOS Linux. 备份脚本使用方法 请先确认已经正确安装node.js 安装后打开软件的scripts目录, 为

ziyu 9 Nov 12, 2022
Perfect SvelteKit dark mode in 2 lines of code. Support System preference and any other theme with no flashing

This library is a port of next-theme for SvelteKit. All credit goes to pacocoursey and all next-themes contributors While usable, this library is stil

null 42 Sep 30, 2022
This is a blog built with sveltekit, tailwind and daisyUI, made to be used as my personal blog.

svelte-blogger This is a blog built with sveltekit, tailwind and daisyUI, made to be used as my personal blog. This app also use graphql and use markd

lipe 6 Jun 23, 2022
End-to-end typesafe APIs with tRPC.io in SvelteKit applications

✨ tRPC-SvelteKit End-to-end typesafe APIs with tRPC.io in SvelteKit applications. No code generation, run-time bloat, or build pipeline. ❤️ ???? See b

Ionut-Cristian Florescu 307 Dec 29, 2022
Documentation integration for SvelteKit.

KitDocs Documentation integration for SvelteKit. You can think of it as a VitePress alternative for Svelte. ✨ Features ?? Vite plugin for transforming

Svelteness 244 Dec 28, 2022