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

removeSource option deletes .d.ts files within node modules #53

Open
cleavera opened this issue Jul 17, 2017 · 3 comments · May be fixed by #54
Open

removeSource option deletes .d.ts files within node modules #53

cleavera opened this issue Jul 17, 2017 · 3 comments · May be fixed by #54

Comments

@cleavera
Copy link

When using the removeSource option. If your bundle references a .d.ts file inside node_modules it deletes this file.

I would expect it to ignore anything outside the project when cleaning up the definitions files

@tolemac
Copy link
Contributor

tolemac commented Jul 17, 2017

It should be fixed at https://github.com/TypeStrong/dts-bundle/blob/master/lib/index.ts#L379

Could you build a regexpr to decide if you have to revome the file?

You could add other regexpr to the conditional, for example:

if (p !== outFile && dtsExp.test(p) && fs.statSync(p).isFile() && canRemoveExp.test())

@cleavera
Copy link
Author

Just to confirm are you talking about a user configurable regular expression or a built in regex?

@tolemac
Copy link
Contributor

tolemac commented Jul 17, 2017

I thought in a built in regexp at the moment...
A regexp that exclude node_modules folder.

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 a pull request may close this issue.

2 participants