Skip to content

Commit fcedc57

Browse files
committed
Launcher Proto 0
0 parents  commit fcedc57

36 files changed

Lines changed: 4184 additions & 0 deletions

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release Latest Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 20
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Remove old files
26+
run: |
27+
rm -rf dist
28+
mkdir dist
29+
30+
- name: Build project
31+
run: npm run build
32+
33+
- name: Clean up source files
34+
run: |
35+
find . -mindepth 1 -maxdepth 1 ! -name 'dist' ! -name '.git' -exec rm -rf {} +
36+
37+
- name: Copy files from dist
38+
run: |
39+
mv dist/* .
40+
rmdir dist
41+
42+
- name: Version File
43+
run: |
44+
date +%s > version.txt
45+
46+
- name: Set up Git
47+
run: |
48+
git config user.name "github-actions[bot]"
49+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
50+
git checkout --orphan latest-release
51+
52+
- name: Commit and push changes
53+
run: |
54+
git add .
55+
git commit -m "Latest build $(date "+%Y-%m-%d %H:%M:%S")"
56+
git push -f origin latest-release
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
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?

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
```js
15+
export default tseslint.config([
16+
globalIgnores(['dist']),
17+
{
18+
files: ['**/*.{ts,tsx}'],
19+
extends: [
20+
// Other configs...
21+
22+
// Remove tseslint.configs.recommended and replace with this
23+
...tseslint.configs.recommendedTypeChecked,
24+
// Alternatively, use this for stricter rules
25+
...tseslint.configs.strictTypeChecked,
26+
// Optionally, add this for stylistic rules
27+
...tseslint.configs.stylisticTypeChecked,
28+
29+
// Other configs...
30+
],
31+
languageOptions: {
32+
parserOptions: {
33+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
34+
tsconfigRootDir: import.meta.dirname,
35+
},
36+
// other options...
37+
},
38+
},
39+
])
40+
```
41+
42+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43+
44+
```js
45+
// eslint.config.js
46+
import reactX from 'eslint-plugin-react-x'
47+
import reactDom from 'eslint-plugin-react-dom'
48+
49+
export default tseslint.config([
50+
globalIgnores(['dist']),
51+
{
52+
files: ['**/*.{ts,tsx}'],
53+
extends: [
54+
// Other configs...
55+
// Enable lint rules for React
56+
reactX.configs['recommended-typescript'],
57+
// Enable lint rules for React DOM
58+
reactDom.configs.recommended,
59+
],
60+
languageOptions: {
61+
parserOptions: {
62+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
63+
tsconfigRootDir: import.meta.dirname,
64+
},
65+
// other options...
66+
},
67+
},
68+
])
69+
```

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
import { globalIgnores } from 'eslint/config'
7+
8+
export default tseslint.config([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

index.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
7+
<title>GraphScript Launcher</title>
8+
<link rel="icon" type="image/svg+xml" href="/GraphScript.png" />
9+
10+
<meta name="title" content="GraphScript">
11+
<meta name="description" content="GraphScript is a general-purpose visual scripting editor that lets you build logic by connecting visual nodes. No code, just flow.">
12+
13+
<meta property="og:type" content="website">
14+
<meta property="og:url" content="https://graphscript-labs.github.io/">
15+
<meta property="og:title" content="GraphScript">
16+
<meta property="og:description" content="GraphScript is a general-purpose visual scripting editor that lets you build logic by connecting visual nodes. No code, just flow.">
17+
<meta property="og:image" content="https://github.com/GraphScript-Labs/.github/blob/main/Banner.png?raw=true">
18+
19+
<meta name="twitter:card" content="summary_large_image">
20+
<meta name="twitter:url" content="https://graphscript-labs.github.io/">
21+
<meta name="twitter:title" content="GraphScript">
22+
<meta name="twitter:description" content="GraphScript is a general-purpose visual scripting editor that lets you build logic by connecting visual nodes. No code, just flow.">
23+
<meta name="twitter:image" content="https://github.com/GraphScript-Labs/.github/blob/main/Banner.png?raw=true">
24+
25+
<style>
26+
.pywebview-drag-region {
27+
position: fixed;
28+
top: 0;
29+
left: 0;
30+
width: 100%;
31+
background: transparent;
32+
opacity: 0;
33+
height: 100%;
34+
z-index: 1;
35+
}
36+
</style>
37+
</head>
38+
<body>
39+
<span class="pywebview-drag-region"></span>
40+
<div id="root"></div>
41+
42+
<script>
43+
document.addEventListener("contextmenu", (event) => {
44+
// event.preventDefault();
45+
});
46+
</script>
47+
48+
<script type="module" src="/src/main.tsx"></script>
49+
</body>
50+
</html>

0 commit comments

Comments
 (0)