Open Runeii opened 4 months ago
I tried with this MR to ensure the final library doesn't differ from how it was intended to be used currently, nor change the coding style. But if I've overlooked something, let me know and happy to adjust! This mainly came from my own needs, where it would be ideal to have full typing in a wider project.
Thanks for submitting this! I'll take a look asap.
Good to hear!
Install instructions would depend on need:
To add to a project via npm/dependency
npm install three qx82 --save
(if package is added to npm)npm install three Runeii/qx82#vite --save
(if installing from my PR from Github)npm install three btco/qx82--save
(if installing from this repo post merge from Github)To add via CND The qx82 folder still exposes the same built qx/qxa/qxu js files.
Something I spotted while doing this, btw – see my comment on line 451 in main.ts. I believe there's a bug, but not sure it would ever happen.
It looks like when I install with npm install three Runeii/qx82#vite --save
, it creates node_modules/qx82
but inside of it there aren't any JS files, only TS files.
How would people using plain JS use this? Sorry for all the questions, I don't have a lot of experience with npm build systems.
Thanks!
That was actually my mistake, I forgot to commit the built files. If you reinstall now it should include both types.
If someone is using a build system/npm, this is designed to expose both TS and JS versions and will work with both.
For other users, once merged, they can still just get the JS files from inside /qx82 same as before.
Rewrites codebase to use TS and Vite build process.
While this introduces (fairly minor) overhead for building the project, it gives benefits:
Additional feature:
This also would allow qx82 to be available via npm.