question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript Watch - Cleaning Target Files on Source Deletion

See original GitHub issue

Can we add a compiler option to also glob-delete a target file when the source file is removed? We run into this constantly and have to gulp clean frequently - it makes the usage of tsc -watch pointless as we have to constantly purge the output directory.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:123
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

55reactions
bescommented, Jan 11, 2019

Hi!

This is constantly biting us during development. A file is removed - but nightwatch / some other library still picks it up and runs tests based on code that should not be there.

Last activity on this was more than 8 months ago, but I hope there is still a possibility for this to be added?

Thanks!

44reactions
beverts312commented, Jun 4, 2019

This functionality would also be helpful on a simple --clean, this is effecting us in CI and when switching between branches locally

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript Watch - Removing Deleted Target JS Files
What the solution involved was using file watchers to trigger deletion callback event and removing the tsc watch file from the source file...
Read more >
Documentation - tsc CLI Options - TypeScript
Flag Type Default ‑‑allowJs boolean false ‑‑allowUmdGlobalAccess boolean false ‑‑allowUnreachableCode boolean
Read more >
Command Line Interface - ESLint - Pluggable JavaScript Linter
Run on two files npx eslint file1.js file2.js # Run on multiple files npx eslint ... uses when searching for target files in...
Read more >
TypeScript clean build - Blogs of Raghs
At time we need to wipe off all the .js files generated by the TypeScript Compiler ( tsc ) to have a fresh...
Read more >
rollup.js
Import everything from the source module as an object which exposes all the ... You can prevent files from being emitted by deleting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found