这是indexloc提供的服务,不要输入任何密码
Skip to content

clarify documentation regarding clean option #746

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

Closed
wants to merge 1 commit into from

Conversation

gavinsharp
Copy link
Contributor

I noticed via code inspection that specifying clean: true does not remove *.d.ts files by default, which was unexpected to me. This updates the documentation for this option to clarify that.

I noticed [via code inspection] that specifying `clean: true` does not remove `*.d.ts` files by default, which was unexpected to me. This updates the documentation for this option to clarify that.
@vercel
Copy link

vercel bot commented Oct 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tsup ✅ Ready (Inspect) Visit Preview Oct 17, 2022 at 7:20PM (UTC)

@egoist
Copy link
Owner

egoist commented Oct 18, 2022

it actually removes your .d.ts files here (before generating .d.ts):

await removeFiles(['**/*.d.ts'], options.outDir)

@gavinsharp
Copy link
Contributor Author

Oh interesting. For some reason that isn't working for me, I will debug further.

@gavinsharp
Copy link
Contributor Author

OK, it seems like the issue is that I am not using dts: true (I invoke tsc myself separately to generate types), so that Rollup plugin does not run.

@gavinsharp
Copy link
Contributor Author

Perhaps the *.d.ts exclusion for the first-pass clean should be conditional on dts: true? I could open another PR for that.

gavinsharp added a commit to gavinsharp/tsup that referenced this pull request Oct 18, 2022
See egoist#746 for my initial confusion. I generate my types through a separate process (manual `tsc` invocation), and was confused when `clean: true` was not removing them when running tsup.
@gavinsharp
Copy link
Contributor Author

Not relevant after #747

@gavinsharp gavinsharp closed this Apr 19, 2023
@gavinsharp gavinsharp deleted the patch-1 branch April 19, 2023 15:55
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.

2 participants