-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made it all typescripty #22
base: main
Are you sure you want to change the base?
Conversation
This is getting out of hand with these commits. Closing this PR until its sorted 😅 |
I fixed it! Sorry about all the commits 😬 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for tackling this! it looks like some generated files got checked in, but overall I think this looks solid. I have one question about the dist target and package changes that might cause issues with Toast, but I'll try that out and see how it goes
could you pull the generated files out, please?
@@ -16,17 +11,16 @@ | |||
"scripts": { | |||
"build:cjs": "tsc src/index.ts --outDir . -d", | |||
"build:esm": "cpy ./src/index.ts . --rename=index.mjs", | |||
"build": "yarn build:cjs && yarn build:esm", | |||
"build": "tsc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might cause issues with Toast due to ESM/CJS compat problems. I'll try to pull this and try it out to see
Thanks! Ive not forked an npm package before so i apologize for the many commits after the fact. This was more confusing than i thought it would be. Ive added the dist folder to gitignore, but added it to the files array so its not included in the repo. This of course means that i cant test this locally on my repo with:
As thats pulling the branch without the dist, so no types and module found. But this should be correct now. As for the removal of your cjs/esm script, sorry im not sure how to proceed there. If this has just created a bunch of work for you to do then of course feel free to close this PR 😅 |
Hey Jason! I took a swing at converting this package to typescript and it seems to work nice for me on my fork. Thought i would open a PR and see if you were interested in any in any of this code. Im no TS pro so there might be things that should be tightened up. 😊