A starter project for building modern cross-platform desktop apps in Go, HTML, and Svelte.
This project is a fork of lorca-ts-react-starter. Thank You to Erik Agsjö
Either just clone this repo and start coding, or repeat the simple steps taken to create it yourself to get that warm fuzzy feeling of having done it all "by hand".
Since this project builds on [Lorca][2], you need Chrome installed to develop and run your app. You also need recent enough versions of Go (1.16), Node.js and npm installed.
git clone https://github.com/bmw2621/svelte-lorca-template.git <NEWPROJECTNAME>
cd <NEWPROJECTNAME>
yarn
yarn start
In the project directory, you can run:
yarn start
Builds the Svelte application and serves it. The "backend" Go part will launch Chrome to display the HTML content. This is not in watch mode, for watch mode run yarn dev
yarn dev
Starts the Svelte application in development mode (hot reload watching for file changes). The "backend" Go part will launch Chrome to display the HTML content.
yarn build
Builds the app for production, creating a single executable for the "backend" Go application. It correctly bundles Svelte in production mode and optimizes the build for the best performance. The Go executable will still require the bundled Svelte client application which builds to the public
directory.
yarn test
Runs go test and jest. Go test will fail without the assets.go
file that is run during code generation, so go generate
runs first. Frontend and backend tests can be run individually with yarn svelte:test
or yarn go:test
respectively.
node ./scripts/setupTypeScript.js
Uses the Svelte Template provided script to add typescript to the frontend project