Skip to content

Commit

Permalink
Use esbuild, similar to upstream Goodluck
Browse files Browse the repository at this point in the history
  • Loading branch information
stasm committed Feb 24, 2024
1 parent fbab40e commit 030de30
Show file tree
Hide file tree
Showing 32 changed files with 2,192 additions and 284 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CD
on:
push:
branches:
- "main"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 🛎️ Check out
uses: actions/checkout@v2
- name: 🧮 Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: 📦 Install dependencies
run: npm ci
- name: 🧽 Lint
run: npm run lint
- name: 🛠️ Build
run: make -C play
- name: 🚀 Deploy
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: play
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛎️ Check out
uses: actions/checkout@v2
- name: 🧮 Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: 📦 Install dependencies
run: npm ci
- name: 🧽 Lint
run: npm run lint
- name: 🛠️ Type-check
run: npm run ts:check
22 changes: 0 additions & 22 deletions .github/workflows/main.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.vscode/*.log
node_modules
package-lock.json
public/js
public/opt/*.js
public/opt/*.tfu
*.js
*.js.map
play/index.*
21 changes: 1 addition & 20 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,7 @@
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://localhost:1234",
"webRoot": "${workspaceFolder}/public"
},
{
"type": "edge",
"request": "launch",
"version": "dev",
"name": "Edge (Dev)",
"url": "http://localhost:1234",
"webRoot": "${workspaceFolder}/public"
},
{
"type": "chrome",
"request": "launch",
"name": "App",
"runtimeArgs": [
"--window-size=1280,720",
"--app=http://localhost:1234"
],
"webRoot": "${workspaceFolder}/public"
"url": "http://localhost:1234/src",
},
]
}
14 changes: 10 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"files.exclude": {
"{core,lib,materials,meshes,[A-Z]*}/*.js": true,
"**/*.js.map": true,
"package-lock.json": true,
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit",
},
"[html]": {
"editor.formatOnSave": false
}
"npm.autoDetect": "off",
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifierEnding": "js",
}
29 changes: 23 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,33 @@
"version": "2.0.0",
"tasks": [
{
"label": "esbuild (transpile, bundle, serve)",
"group": "build",
"type": "npm",
"script": "build",
"problemMatcher": ["$tsc"],
"group": "build"
"script": "start",
"isBackground": true,
},
{
"label": "tsc --noEmit (watch for file changes and type-check)",
"group": "build",
"type": "npm",
"script": "start",
"problemMatcher": ["$tsc-watch"],
"group": "build"
"script": "ts:watch",
"isBackground": true,
"problemMatcher": "$tsc-watch",
},
{
"label": "All (default)",
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": [
"esbuild (transpile, bundle, serve)",
"tsc --noEmit (watch for file changes and type-check)",
],
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
36 changes: 0 additions & 36 deletions Makefile

This file was deleted.

7 changes: 0 additions & 7 deletions bundle_config.js

This file was deleted.

2 changes: 2 additions & 0 deletions lib/window.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare var DEBUG: boolean;
declare var OUTDIR: string;
10 changes: 0 additions & 10 deletions minify_config.js

This file was deleted.

Loading

0 comments on commit 030de30

Please sign in to comment.