Skip to content

Commit a98cdba

Browse files
committed
feat: all in one
1 parent 75c877d commit a98cdba

File tree

17 files changed

+2534
-127
lines changed

17 files changed

+2534
-127
lines changed

.github/workflows/deploy.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
[
8+
"src/**/*.js",
9+
"src/**/*.css",
10+
"src/**/*.html",
11+
"src/**/*.svg",
12+
"src/**/*.json",
13+
"src/**/*.ts",
14+
"src/**/*.tsx",
15+
"src/**/*.sh",
16+
]
17+
workflow_dispatch: {}
18+
19+
jobs:
20+
build:
21+
name: Build
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repo
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
31+
- name: Build project
32+
run: npm install -g pnpm && pnpm install && pnpm run build
33+
34+
- name: Upload production-ready build files
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: production-files
38+
path: ./dist
39+
40+
deploy:
41+
name: Deploy
42+
needs: build
43+
runs-on: ubuntu-latest
44+
if: github.ref == 'refs/heads/main'
45+
46+
steps:
47+
- name: Download artifact
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: production-files
51+
path: ./dist
52+
53+
- name: Deploy to GitHub Pages
54+
uses: peaceiris/actions-gh-pages@v4
55+
with:
56+
github_token: ${{ secrets.GITHUB_TOKEN }}
57+
publish_dir: ./dist

.gitignore

Lines changed: 15 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -4,133 +4,21 @@ logs
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7+
pnpm-debug.log*
78
lerna-debug.log*
8-
.pnpm-debug.log*
99

10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
10+
node_modules
9211
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# vitepress build output
108-
**/.vitepress/dist
109-
110-
# vitepress cache directory
111-
**/.vitepress/cache
112-
113-
# Docusaurus cache and generated files
114-
.docusaurus
115-
116-
# Serverless directories
117-
.serverless/
118-
119-
# FuseBox cache
120-
.fusebox/
121-
122-
# DynamoDB Local files
123-
.dynamodb/
124-
125-
# TernJS port file
126-
.tern-port
127-
128-
# Stores VSCode versions used for testing VSCode extensions
129-
.vscode-test
130-
131-
# yarn v2
132-
.yarn/cache
133-
.yarn/unplugged
134-
.yarn/build-state.yml
135-
.yarn/install-state.gz
136-
.pnp.*
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
},
28+
)

index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon"
7+
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>👩‍💻</text></svg>" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9+
<title>comfyui-client-transpiler Playground</title>
10+
</head>
11+
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/src/main.tsx"></script>
15+
</body>
16+
17+
</html>

package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "myapp",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@monaco-editor/react": "^4.7.0",
14+
"@stable-canvas/comfyui-client-transpiler": "^1.0.2",
15+
"@stable-canvas/cw-reader": "^1.0.1",
16+
"normalize.css": "^8.0.1",
17+
"react": "^19.1.0",
18+
"react-dom": "^19.1.0",
19+
"react-dropzone": "^14.3.8"
20+
},
21+
"devDependencies": {
22+
"@eslint/js": "^9.25.0",
23+
"@types/react": "^19.1.2",
24+
"@types/react-dom": "^19.1.2",
25+
"@vitejs/plugin-react": "^4.4.1",
26+
"eslint": "^9.25.0",
27+
"eslint-plugin-react-hooks": "^5.2.0",
28+
"eslint-plugin-react-refresh": "^0.4.19",
29+
"globals": "^16.0.0",
30+
"typescript": "~5.8.3",
31+
"typescript-eslint": "^8.30.1",
32+
"vite": "^6.3.5",
33+
"vite-plugin-environment": "^1.1.3"
34+
}
35+
}

0 commit comments

Comments
 (0)