Conversation
|
To work with this version of the demos while hacking on Workbench, you can bind mount it. For example, sudo mount --bind /path/to/cloned/demos /path/to/Worbench |
|
Currently all the demos are ported 🥳. However, some demos have Now it's time for rebase, and working on other steps. |
a00b394 to
c341532
Compare
|
@vixalien Why do you use |
|
Yeah we should use that everywhere. I used the former method when I was getting started on this, since I didn't know the latter was possible. |
|
I'll add a commit tomorrow, if you don't beat me to it. |
c341532 to
e41f55e
Compare
|
@sonnyp I have been brought to the attention of |
e41f55e to
aeea1bf
Compare
|
I'm currently working towards enabling strict mode in TS. This will catch more errors, but also makes the code look a bit more complex, because there are more null assertions. @JumpLink you might be interested to look at all the |
|
@vixalien I fixed all the places I could find, that were still not using the generic get_object. But I didn't test it 😅 |
|
I had already pushed the changes and you force pushed the branch 🙈🙊 |
|
@vixalien I didn't do a force push. According to GitHub I added the commits - "UrtsiSantsi added 12 commits", "UrtsiSantsi added 28 commits", while when you force pushed earlier it is "vixalien force-pushed the wip/vixalien/typescript branch from e41f55e to aeea1bf". My changes are on top of your changes - you fixed the case where the pattern |
Oh, I see. I actually left out those cases, but I was just being lazy 😆. Thanks! I will need to rebase them so that we have a singular commit for each file. i.e. "port: Camera", "port: Welcome" etc... but don't worry about it. I've also gone and enabled strict mode, which now causes a few more errors to pop in. You can run |
|
@vixalien don't worry about commit history, I'll squash everything when merging Individual commits won't be helpful. |
They should be in Workbench since that's the runtime.
Ditto
👍
This looks interesting for “compiling” ts files before running. But we still need a solution to compile ts files to js for humans. |
Actually we could also use ts-blank-space and simplify process the result with prettier. |
|
I think we should leave java script as a language option:
|
Sure. I'll work on it next. |
|
@UrtsiSantsi that's the idea 👍 |
|
With GJS now supporting sourcemaps, there is no need for |
|
Can you still use any help here? |
Not much, really. I'm going to rebase this PR and add types for the other demos. Since you're the types guy, you can check the demos I marked with a warning emoji ( |
Done using `find src/ -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;`
included in-tree for now. might need to look for long-lasting solution
4555635 to
bd68229
Compare
|
Yeah, I think what's next for this is to figure out how to use these types in Workbench:
|
Yes 👍
I can take care of that if you like
Did we find a solution to compile to reasonable JavaScript? As in keep variable names and so on |
Not sure. If I remember, you have suggested we use babel in the past. We can also use other build tools such as esbuild, then prettify the output. (esbuild eats empty lines, though) |
|
https://babeljs.io/docs/babel-plugin-transform-typescript should do the trick 👍 |
|
Okay, I would say now the ball is now in your hands |
See also #201 --------- Co-authored-by: Angelo Verlain <geoangercola@gmail.com>
|
I have partially merged this e4b515e |
This is my attempt to porting demos from javascript to workbench.
Groundwork
.jsto.ts. I will be running the TypeScript compiler (withtsc) to fix demo files as we go.README.typescript.mdshowing basic instructions on how I generated the typestsconfig.jsonfileworkbench-typesFuture tasks
.tsfilesPorted demos