abcjs
abcjs copied to clipboard
Typescript Migration
Absolutely don't merge this YET!
Hello Mr. Rosen,
Sorry to have been so MIA these past few months. I finally found some time to work on the switch to TS this week.
Here's the migration to typescript we had discussed. It's still in draft state, but I wanted to submit it to you asap, so you'd be able to object to anything that doesn't fly.
- I used
ts-migratefor the migration. - updated webpack and babel to compile (mostly working, except for the abcjs-plugin, which has some issues)
- switched
requiresandmodules.exportstoimportsandexports - added prettier and eslint to the project - eslint is disabled for now, as the current setup has conflicts between the two. This was a necessary addition to do the migration
- in
package.json: project's "type" has been set to "module" in order to useimportsandexports. I don't know if this potentially breaks anything for users of the library? The output still uses es5, though. - tests haven't been updated yet: links to js files are broken and I believe that
<script>imports in thehtmlfiles of the tests might require an "type=module" tag
That's all I have for now, I hope you'll find this PR useful!
Cheers
Hi Antoine, the first thing I notice is that you've requested a merge to main. Please merge to dev instead. I push to main only when I'm creating a release.
I'll look at the actual code this week.
Sounds good, I changed the destination!
First thing I noticed is that the copyright notice is not on top of the abcjs-basic.min.js file.