Skip to content

Commit 988bee6

Browse files
feat: revision 0.0.19 (#12)
* change: moved files * change: drop webpack * change: start using typescript * feat: bump engine 0.0.19 * docs: meta * docs: contribuing in readme * ci/cd: fixing version gh pages
1 parent dbdc077 commit 988bee6

16 files changed

+62
-101
lines changed

.github/workflows/docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
run: |
3030
npm run build
3131
-
32-
uses: actions/configure-pages@v3
32+
uses: actions/configure-pages@v4
3333
-
34-
uses: actions/upload-pages-artifact@v2
34+
uses: actions/upload-pages-artifact@v3
3535
with:
3636
path: 'dist'
3737
-
3838
id: deployment
39-
uses: actions/deploy-pages@v2
39+
uses: actions/deploy-pages@v4

README.md

742 Bytes

tool-img-gen

createGenerate screenshots and icons from gGly eEngine lLua code.

Contributing

Layout

Code

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/assets/index.css renamed to assets/index.css

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/index.html renamed to index.html

+17-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-14
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,14 @@
66
"funding": "https://github.com/sponsors/RodrigoDornelles",
77
"bugs": "https://github.com/gamelly/tool-img-gen/issues",
88
"devDependencies": {
9-
"@gamely/core-native-html5": "^0.0.17",
10-
"@gamely/gly-engine-lite": "^0.0.17",
11-
"copy-webpack-plugin": "11.0.0",
12-
"css-loader": "6.7.3",
13-
"html-webpack-plugin": "5.5.0",
14-
"monaco-editor": "0.35.0",
15-
"monaco-editor-webpack-plugin": "7.0.1",
16-
"style-loader": "3.3.1",
9+
"@gamely/core-native-html5": "^0.0.19",
10+
"@gamely/gly-engine-lite": "^0.0.19",
1711
"wasmoon": "1.16.0",
18-
"webpack": "^5.95.0",
19-
"webpack-cli": "5.0.1",
20-
"webpack-dev-server": "^5.1.0"
12+
"monaco-editor": "0.35.0",
13+
"bun": "^1.2.4"
2114
},
2215
"scripts": {
23-
"serve": "webpack serve --mode=development --watch --progress --open",
24-
"start": "webpack --mode=development --watch --progress",
25-
"build": "webpack --mode=production"
16+
"build": "bun build --external=module --outdir=dist --entrypoint index.html",
17+
"start": "bun run build --chunk-naming '[dir]/[name].[ext]' --watch"
2618
}
2719
}

src/index.d.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
declare module "*.lua" {
2+
const content: string;
3+
export default content;
4+
}
5+
6+
declare module 'wasmoon/dist/glue.wasm' {
7+
const content: string;
8+
export default content;
9+
}
10+
11+
declare module '@gamely/gly-engine-lite' {
12+
const content: string;
13+
export default content;
14+
}

src/index.js renamed to src/index.ts

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
import wasmFile from 'wasmoon/dist/glue.wasm';
22
import { LuaFactory, LuaMultiReturn } from 'wasmoon'
3-
import { editor } from 'monaco-editor'
3+
import { editor, languages } from 'monaco-editor/esm/vs/editor/editor.api'
4+
import * as lualang from 'monaco-editor/esm/vs/basic-languages/lua/lua'
45
import gly from '@gamely/core-native-html5'
5-
import gly_engine from '@gamely/gly-engine-lite/dist/main.lua'
6-
import defaultScript from './default.lua'
6+
import gly_engine from '@gamely/gly-engine-lite' assert {type: "text"}
7+
import defaultScript from './default.lua' assert {type: "text"}
78

8-
let monacoTimeout;
9+
let monacoTimeout: number;
910

1011
document.addEventListener('DOMContentLoaded', async () => {
11-
const elInpWidth = document.querySelector('#width')
12-
const elInpHeight = document.querySelector('#height')
13-
const elInpStroke = document.querySelector('#stroke')
14-
const elSelFormat = document.querySelector('#resolution')
15-
const elBtnDownload = document.querySelector('#download')
16-
const elChkAntiAliasing = document.querySelector('#antialiasing')
17-
const elSelResolution = document.querySelector('#resolution')
18-
const elMonacoEditor = document.querySelector('#editor')
19-
const elCanvas = document.querySelector('#gameCanvas')
20-
12+
const elInpWidth = document.querySelector('#width') as HTMLInputElement
13+
const elInpHeight = document.querySelector('#height') as HTMLInputElement
14+
const elInpStroke = document.querySelector('#stroke') as HTMLInputElement
15+
const elSelFormat = document.querySelector('#resolution') as HTMLInputElement
16+
const elBtnDownload = document.querySelector('#download') as HTMLElement
17+
const elChkAntiAliasing = document.querySelector('#antialiasing') as HTMLInputElement
18+
const elSelResolution = document.querySelector('#resolution') as HTMLInputElement
19+
const elMonacoEditor = document.querySelector('#editor') as HTMLElement
20+
const elCanvas = document.querySelector('#gameCanvas') as HTMLCanvasElement
21+
22+
languages.register({ id: 'lua' })
23+
languages.setMonarchTokensProvider('lua', lualang.language)
2124
const monacoEditor = editor.create(elMonacoEditor, {
2225
language: 'lua',
2326
theme: 'vs-dark',

webpack.config.js

-57
This file was deleted.

0 commit comments

Comments
 (0)