Skip to content

Commit 030de30

Browse files
committed
Use esbuild, similar to upstream Goodluck
1 parent fbab40e commit 030de30

32 files changed

+2192
-284
lines changed

.github/workflows/cd.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CD
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: 🛎️ Check out
11+
uses: actions/checkout@v2
12+
- name: 🧮 Use Node.js
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 16.x
16+
- name: 📦 Install dependencies
17+
run: npm ci
18+
- name: 🧽 Lint
19+
run: npm run lint
20+
- name: 🛠️ Build
21+
run: make -C play
22+
- name: 🚀 Deploy
23+
uses: JamesIves/[email protected]
24+
with:
25+
branch: gh-pages
26+
folder: play

.github/workflows/ci.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
on: pull_request
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: 🛎️ Check out
8+
uses: actions/checkout@v2
9+
- name: 🧮 Use Node.js
10+
uses: actions/setup-node@v1
11+
with:
12+
node-version: 16.x
13+
- name: 📦 Install dependencies
14+
run: npm ci
15+
- name: 🧽 Lint
16+
run: npm run lint
17+
- name: 🛠️ Type-check
18+
run: npm run ts:check

.github/workflows/main.yml

-22
This file was deleted.

.gitignore

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
.DS_Store
2+
.vscode/*.log
13
node_modules
2-
package-lock.json
3-
public/js
4-
public/opt/*.js
5-
public/opt/*.tfu
4+
*.js
5+
*.js.map
6+
play/index.*

.vscode/launch.json

+1-20
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,7 @@
88
"type": "chrome",
99
"request": "launch",
1010
"name": "Chrome",
11-
"url": "http://localhost:1234",
12-
"webRoot": "${workspaceFolder}/public"
13-
},
14-
{
15-
"type": "edge",
16-
"request": "launch",
17-
"version": "dev",
18-
"name": "Edge (Dev)",
19-
"url": "http://localhost:1234",
20-
"webRoot": "${workspaceFolder}/public"
21-
},
22-
{
23-
"type": "chrome",
24-
"request": "launch",
25-
"name": "App",
26-
"runtimeArgs": [
27-
"--window-size=1280,720",
28-
"--app=http://localhost:1234"
29-
],
30-
"webRoot": "${workspaceFolder}/public"
11+
"url": "http://localhost:1234/src",
3112
},
3213
]
3314
}

.vscode/settings.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
2+
"files.exclude": {
3+
"{core,lib,materials,meshes,[A-Z]*}/*.js": true,
4+
"**/*.js.map": true,
5+
"package-lock.json": true,
6+
},
27
"editor.formatOnSave": true,
38
"editor.codeActionsOnSave": {
4-
"source.organizeImports": true
9+
"source.organizeImports": "explicit",
510
},
6-
"[html]": {
7-
"editor.formatOnSave": false
8-
}
11+
"npm.autoDetect": "off",
12+
"typescript.tsc.autoDetect": "off",
13+
"typescript.tsdk": "node_modules/typescript/lib",
14+
"typescript.preferences.importModuleSpecifierEnding": "js",
915
}

.vscode/tasks.json

+23-6
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,33 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7+
"label": "esbuild (transpile, bundle, serve)",
8+
"group": "build",
79
"type": "npm",
8-
"script": "build",
9-
"problemMatcher": ["$tsc"],
10-
"group": "build"
10+
"script": "start",
11+
"isBackground": true,
1112
},
1213
{
14+
"label": "tsc --noEmit (watch for file changes and type-check)",
15+
"group": "build",
1316
"type": "npm",
14-
"script": "start",
15-
"problemMatcher": ["$tsc-watch"],
16-
"group": "build"
17+
"script": "ts:watch",
18+
"isBackground": true,
19+
"problemMatcher": "$tsc-watch",
20+
},
21+
{
22+
"label": "All (default)",
23+
"group": {
24+
"kind": "build",
25+
"isDefault": true
26+
},
27+
"dependsOn": [
28+
"esbuild (transpile, bundle, serve)",
29+
"tsc --noEmit (watch for file changes and type-check)",
30+
],
31+
"runOptions": {
32+
"runOn": "folderOpen"
33+
}
1734
}
1835
]
1936
}

Makefile

-36
This file was deleted.

bundle_config.js

-7
This file was deleted.

lib/window.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare var DEBUG: boolean;
2+
declare var OUTDIR: string;

minify_config.js

-10
This file was deleted.

0 commit comments

Comments
 (0)