-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[js] work-in-progress JS version test
- Loading branch information
Showing
25 changed files
with
7,683 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Javascript | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'js/**' | ||
- '.github/workflows/js.yml' | ||
pull_request: | ||
paths: | ||
- 'js/**' | ||
- '.github/workflows/js.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
common: | ||
name: Common | ||
uses: ./.github/workflows/common.yml | ||
with: | ||
workdir: js | ||
format-pkgs: nodejs libsdl2-dev | ||
build-pkgs: nodejs libsdl2-dev libc-bin | ||
cache-paths: | | ||
js/node_modules | ||
cache-file: '**/package-lock.json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.parcel-cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
RosettaBoy - JavaScript (TypeScript (Node)) Version | ||
=================================================== | ||
|
||
Thoughts on JS / TS / Node | ||
-------------------------- | ||
|
||
On TypeScript vs JavaScript: | ||
* TypeScript seems better in every way, except that it requires a build step :( | ||
|
||
On the state of NPM libraries: | ||
* Try one SDL library, it doesn't compile | ||
* Try another SDL library, realise it hasn't been updated in 8 years and doesn't work with current Node | ||
* Try a third SDL library, realise that it makes a lot of assumptions and has its own API that's very different from SDL | ||
* Find some modern, supported, well-behaved libraries... which _exclusively_ cover the audio interface and nothing else | ||
* Give up on SDL libraries, try the FFI library instead to build my own | ||
* Find that there's no official FFI library, so I try the FFI library on NPM | ||
* Find that the FFI library on NPM was abandoned several years ago | ||
* Seems like somebody forked the above to make a stable version and _has_ kept it up to date, so let's try that... | ||
* The up-to-date FFI library links to the abandoned library's docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
cd $(dirname $0) | ||
if [ ! -d node_modules ] ; then | ||
npm install | ||
fi | ||
npm run build | ||
|
||
cat >rosettaboy-release <<EOD | ||
#!/usr/bin/env bash | ||
set -eu | ||
# gdb -batch -ex "run" -ex "bt" --args | ||
node --enable-source-maps "\$(dirname \$0)/dist/index.js" \$* | ||
EOD | ||
chmod +x rosettaboy-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
if [ ! -d node_modules ] ; then | ||
npm install | ||
fi | ||
npm run format |
Oops, something went wrong.