Add initial typescript support as well as bundling for ES & CJS#245
Draft
calinoracation wants to merge 1 commit intoflackr:masterfrom
Draft
Add initial typescript support as well as bundling for ES & CJS#245calinoracation wants to merge 1 commit intoflackr:masterfrom
calinoracation wants to merge 1 commit intoflackr:masterfrom
Conversation
calinoracation
commented
Feb 12, 2024
| } | ||
|
|
||
| if ([...document.styleSheets].filter((s) => s.href !== null).length) { | ||
| if ([ ...document.styleSheets ].filter((s) => s.href !== null).length) { |
Contributor
Author
There was a problem hiding this comment.
I may of had the pretty: true flag turned on momentarily that led to this autoformatting, happy to remove it.
calinoracation
commented
Feb 12, 2024
| @@ -0,0 +1,29 @@ | |||
| { | |||
| "compilerOptions": { | |||
| "target": "ES2020", | |||
Contributor
Author
There was a problem hiding this comment.
All of these might not be necessary, I was working through which ones were needed or not but starting from a point where at least it was all working for us.
calinoracation
commented
Feb 12, 2024
| }, | ||
| } | ||
| }, | ||
| plugins: [dts()], |
Contributor
Author
There was a problem hiding this comment.
This creates the index.d.ts file for the exported type information. Without this many folks importing through a bundler with typescript would require not-insignificant amounts of changes and no typing information. It's possible to do it without another package, but it helped simplify the output quite a bit.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a slight modification to support typescript type exporting as well as publishing ES & CJS versions along with the published build. It doesn't do auto publishing or tagging mentioned in #57, but might help with figuring a few things out in that process.