This repository has been archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
neil
authored and
neil
committed
Feb 2, 2023
1 parent
ccd00b5
commit 0d6336a
Showing
26 changed files
with
4,933 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node-linker=hoisted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# @tea/desktop | ||
|
||
Desktop app of [tea](https://tea.xyz) for installing packages/softwares | ||
|
||
More interesting and possibly updated documentations are at this [NOTION](https://www.notion.so/teaxyz/tea-gui-fdd9f50aa980432fa370b2cf6a03cb50) page. It is ideal to review it also, its more updated. | ||
|
||
## Developing | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
|
||
```bash | ||
# use if you need interaction with the rust handlers | ||
pnpm tauri dev | ||
|
||
# or if ui dev only | ||
pnpm run dev -- --open | ||
``` | ||
|
||
## Building | ||
|
||
To create a production version of your app: | ||
|
||
```bash | ||
pnpm run build | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
|
||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. | ||
## Testing | ||
|
||
```bash | ||
pnpm playwright install | ||
pnpm test | ||
|
||
``` | ||
|
||
## Intuition Building Links | ||
|
||
- [Rust module system is weird?](https://www.sheshbabu.com/posts/rust-module-system/) | ||
|
||
<p align="center"> | ||
<img src="https://github.com/Dax89/electron-sveltekit/blob/master/icon.png" width="256"> | ||
</p> | ||
<p align="center"> | ||
A minimal project template for Electron and SvelteKit configured with <a href="https://www.npmjs.com/package/@sveltejs/adapter-static">adapter-static</a>. | ||
</p> | ||
|
||
## Screenshot | ||
![Screenshot](https://github.com/Dax89/electron-sveltekit/blob/master/screenshot.png) | ||
|
||
|
||
|
||
## Commands | ||
- `pnpm dev`: Runs SvelteKit in dev mode | ||
- `pnpm preview`: Runs SvelteKit in production mode | ||
- `pnpm electron`: Runs SvelteKit with electron in dev mode | ||
- `pnpm build`: Runs SvelteKit compiler | ||
- `pnpm dev:package`: Creates an Electron package (you can inspect the contents) | ||
- `pnpm package`: Creates a distributable Electron package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"asar": false, | ||
"directories": { "output": "dist" }, | ||
"files": [ | ||
"src/electron.cjs", | ||
{ "from": "build", "to": "" } | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"name": "@tea/desktop", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"package": "pnpm build && electron-builder --config electron-builder.config.json", | ||
"dev:package": "pnpm build && electron-builder --config electron-builder.config.json --dir", | ||
"electron": "concurrently --kill-others \"vite dev\" \"electron src/electron.cjs\"", | ||
"dev": "vite dev --port 8080", | ||
"build": "vite build && cp build/app.html build/index.html", | ||
"preview": "vite preview", | ||
"unit:test": "vitest", | ||
"coverage": "vitest run --coverage", | ||
"test": "playwright test", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write ." | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-node": "^1.0.0-next.101", | ||
"@sveltejs/adapter-static": "^1.0.0-next.48", | ||
"@sveltejs/kit": "^1.0.0-next.562", | ||
"concurrently": "^6.5.1", | ||
"electron": "^22.1.0", | ||
"electron-builder": "^23.6.0", | ||
"electron-reloader": "^1.2.3", | ||
"sass": "^1.56.1", | ||
"svelte": "^3.55.1", | ||
"svelte-preprocess": "^5.0.1", | ||
"vite": "^4.0.4", | ||
"@playwright/experimental-ct-svelte": "^1.29.2", | ||
"@playwright/test": "1.25.0", | ||
"@sveltejs/adapter-auto": "^1.0.0", | ||
"@tea/ui": "workspace:*", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/svelte": "^3.2.2", | ||
"@types/testing-library__jest-dom": "^5.14.5", | ||
"@typescript-eslint/eslint-plugin": "^5.27.0", | ||
"@typescript-eslint/parser": "^5.27.0", | ||
"autoprefixer": "^10.4.13", | ||
"eslint": "^8.16.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-svelte3": "^4.0.0", | ||
"jsdom": "^21.0.0", | ||
"postcss": "^8.4.19", | ||
"prettier": "^2.7.1", | ||
"prettier-plugin-svelte": "^2.7.0", | ||
"prettier-plugin-tailwindcss": "^0.2.0", | ||
"svelte-check": "^2.8.0", | ||
"svelte2tsx": "^0.5.20", | ||
"tailwindcss": "^3.2.4", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.7.4", | ||
"vitest": "^0.27.1" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"electron-log": "^4.4.8", | ||
"electron-serve": "^1.1.0", | ||
"electron-window-state": "^5.0.3", | ||
"@types/bcryptjs": "^2.4.2", | ||
"@types/url-join": "^4.0.1", | ||
"@vitest/coverage-c8": "^0.27.1", | ||
"bcryptjs": "^2.4.3", | ||
"buffer": "^6.0.3", | ||
"fuse.js": "^6.6.2", | ||
"lodash": "^4.17.21", | ||
"lorem-ipsum": "^2.0.8", | ||
"svelte-markdown": "^0.2.3", | ||
"svelte-watch-resize": "^1.0.3", | ||
"url-join": "^5.0.0" | ||
}, | ||
"pnpm": { | ||
"onlyBuiltDependencies": [ | ||
"@tea/ui" | ||
] | ||
} | ||
} |
Oops, something went wrong.