Skip to content
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

feat: add script to strip-comments from downlevel-dts code #11

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

trivikr
Copy link
Owner

@trivikr trivikr commented Sep 17, 2021

Issue #, if available:
N/A

Description of changes:
The script strips comments from all .dts files which are dowleveled.

Before stripping comments
package size:  549.6 kB
unpacked size: 6.3 MB
total files:   670
After stripping comments
package size:  438.4 kB
unpacked size: 5.3 MB
total files:   670

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr merged commit 62611b6 into main Sep 17, 2021
@trivikr trivikr deleted the strip-comments branch September 17, 2021 05:33
.map((dirent) => dirent.name)
.forEach((workspaceDir) => {
const downlevelDir = join(process.cwd(), workspacesDir, workspaceDir, "dist-types/ts3.4");
getAllFiles(downlevelDir).forEach((filepath) => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for downlevelDir exists before parsing files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant