Skip to content

Commit

Permalink
chore: regenerate project manually
Browse files Browse the repository at this point in the history
- use normal sveltekit routing by default
- set up env var to switching SSR & static builds
  • Loading branch information
xynydev committed Apr 3, 2024
1 parent bb230d1 commit 63e506f
Show file tree
Hide file tree
Showing 53 changed files with 2,354 additions and 564 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
31 changes: 31 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
33 changes: 10 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

.rustup
/src-tauri/target/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"plugins": [
"prettier-plugin-tailwindcss",
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 100,
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"svelte.enable-ts-plugin": true,
"workbench.editor.labelFormat": "short",
"editor.formatOnSave": true
}
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ bash -c "SHELL=bash nix develop"
```

Using the dev toolbox container image:

```sh
distrobox create -i ghcr.io/blue-build/workshop-dev -n workshop-dev -p # add --nvidia flag if using nvidia
distrobox enter workshop-dev
```


Install deps

```sh
Expand All @@ -30,7 +30,7 @@ pnpm install

### Run development version

Web browser
SSR web version

```sh
pnpm dev
Expand All @@ -42,6 +42,20 @@ Tauri app
pnpm tauri dev
```

## Recommended IDE Setup
### Recommended IDE Setup

[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).

## Building

Build SSR web version

```sh
pnpm build
```

Build Tauri app

```sh
pnpm tauri build
```
24 changes: 12 additions & 12 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "neutral"
},
"aliases": {
"components": "$lib/ui",
"utils": "$lib/utils"
},
"typescript": true
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "neutral"
},
"aliases": {
"components": "$lib/ui/components",
"utils": "$lib/ui/utils"
},
"typescript": true
}
14 changes: 0 additions & 14 deletions index.html

This file was deleted.

77 changes: 46 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
{
"name": "workshop",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1",
"clsx": "^2.1.0",
"tailwind-merge": "^2.2.2",
"tailwind-variants": "^0.2.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/cli": "^1",
"@tsconfig/svelte": "^5.0.2",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"svelte": "^4.2.8",
"svelte-check": "^3.4.6",
"tailwindcss": "^3.3.6",
"tslib": "^2.6.0",
"typescript": "^5.0.2",
"vite": "^5.0.0"
}
"name": "workshop",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "PUBLIC_ADAPTER=default vite dev",
"build": "PUBLIC_ADAPTER=default vite build",
"build-static": "PUBLIC_ADAPTER=static vite build",
"dev-static": "PUBLIC_ADAPTER=static vite dev",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-cloudflare": "^4.2.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tauri-apps/cli": "^1.5.11",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"postcss": "^8.4.32",
"postcss-load-config": "^5.0.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.2.2",
"prettier-plugin-tailwindcss": "^0.5.9",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"type": "module",
"dependencies": {
"clsx": "^2.1.0",
"tailwind-merge": "^2.2.2",
"tailwind-variants": "^0.2.1"
}
}
Loading

0 comments on commit 63e506f

Please sign in to comment.