-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from av8ta/refactor
Ship it!
- Loading branch information
Showing
112 changed files
with
952 additions
and
600 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,91 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
# branches: ["main"] | ||
branches: ["*"] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
name: Build, Test & Deploy | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
# env: | ||
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
# TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Cache turbo build setup | ||
uses: actions/cache@v4 | ||
with: | ||
path: .turbo | ||
key: ${{ runner.os }}-turbo-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-turbo- | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- uses: jetli/[email protected] | ||
with: | ||
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') | ||
version: "latest" | ||
- name: Build cadmium | ||
run: pnpm build:wasm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Install playwright dependencies | ||
run: pnpm exec playwright install | ||
- name: Build | ||
env: | ||
BASE_PATH: '/${{ github.event.repository.name }}' | ||
run: pnpm turbo run build | ||
- name: Test | ||
run: pnpm turbo run test | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cadmium | ||
path: applications/web/dist | ||
- name: Setup Github Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: applications/web/dist | ||
|
||
# https://kit.svelte.dev/docs/adapter-static#github-pages | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
.DS_Store | ||
node_modules | ||
/node_modules/ | ||
/build | ||
/dist | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
*.env* | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
types.guard.ts | ||
.turbo |
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
{ | ||
"rust-analyzer.linkedProjects": [ | ||
"packages/cadmium/Cargo.toml", | ||
], | ||
"[markdown]": { | ||
"editor.formatOnSave": false, | ||
}, | ||
"javascript.format.semicolons": "remove", | ||
"typescript.preferences.quoteStyle": "double", | ||
"javascript.preferences.quoteStyle": "double" | ||
} | ||
"rust-analyzer.linkedProjects": ["packages/cadmium/Cargo.toml"], | ||
"[markdown]": { | ||
"editor.formatOnSave": false | ||
}, | ||
"javascript.format.semicolons": "remove", | ||
"typescript.preferences.quoteStyle": "double", | ||
"javascript.preferences.quoteStyle": "double", | ||
"editor.tabSize": 2, | ||
"eslint.workingDirectories": [ | ||
{ | ||
"mode": "auto" | ||
} | ||
] | ||
} |
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
File renamed without changes.
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,14 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["eslint:recommended", "plugin:svelte/recommended", "prettier"], | ||
parserOptions: { | ||
sourceType: "module", | ||
ecmaVersion: 2020, | ||
extraFileExtensions: [".svelte"] | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true | ||
} | ||
} |
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,11 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/dist | ||
/.svelte-kit | ||
/package | ||
.env | ||
*.env.* | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
types.guard.ts |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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,58 @@ | ||
{ | ||
"name": "cadmium-web", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"serve": "pnpm build && serve -p 5174 dist", | ||
"clean": "rm -rf .turbo .svelte-kit dist node_modules", | ||
"preview": "vite preview", | ||
"test": "pnpm test:integration && pnpm test:unit", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier --plugin-search-dir . --write .", | ||
"svelte-check": "svelte-check", | ||
"test:integration": "playwright test", | ||
"test:unit": "vitest", | ||
"types:guard": "ts-auto-guard --export-all src/types.d.ts" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.42.1", | ||
"@sveltejs/adapter-static": "^3.0.1", | ||
"@sveltejs/kit": "^2.5.3", | ||
"@sveltejs/vite-plugin-svelte": "^3.0.2", | ||
"autoprefixer": "^10.4.18", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-svelte": "^2.35.1", | ||
"phosphor-svelte": "^1.4.2", | ||
"postcss": "^8.4.35", | ||
"postcss-load-config": "^5.0.3", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-svelte": "^3.2.2", | ||
"serve": "^14.2.1", | ||
"svelte": "^4.2.12", | ||
"svelte-check": "^3.6.6", | ||
"tailwindcss": "^3.4.1", | ||
"ts-auto-guard": "^4.2.0", | ||
"vite": "^5.1.5", | ||
"vitest": "^1.3.1" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@fontsource-variable/manrope": "^5.0.19", | ||
"@threlte/core": "^7.2.1", | ||
"@threlte/extras": "^8.10.1", | ||
"@types/three": "^0.162.0", | ||
"cadmium": "workspace:*", | ||
"camera-controls": "^2.8.3", | ||
"gsap": "^3.12.5", | ||
"js-file-download": "^0.4.12", | ||
"nurbs": "^1.1.1", | ||
"shared": "workspace:*", | ||
"three": "^0.162.0", | ||
"troika-three-text": "^0.49.0", | ||
"vite-plugin-top-level-await": "^1.4.1", | ||
"vite-plugin-wasm": "^3.3.0" | ||
} | ||
} |
File renamed without changes.
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,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<!-- <link rel="icon" href="%sveltekit.assets%/favicon.png" /> --> | ||
<link rel="icon" href="%sveltekit.assets%/cadmium_logo_min.svg" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>CADmium</title> | ||
%sveltekit.head% | ||
</head> | ||
|
||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
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,14 @@ | ||
/* Write your global styles here, in PostCSS syntax */ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer components { | ||
.btn-primary { | ||
@apply h-[45px] px-2 bg-blue-500 text-white font-semibold rounded-lg shadow-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-400 focus:ring-opacity-75; | ||
} | ||
} | ||
|
||
body { | ||
font-family: "Manrope Variable", sans-serif; | ||
} |
File renamed without changes.
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
Oops, something went wrong.