-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature request: don't remove files on --watch
#83
Comments
Would it be possible to just put the css somewhere else? The problem is that if it doesn't delete the dist folder prior to building, then it's too easy to end up with deleted/renamed files sticking around forever. |
Could it instead just remove js/jsx files (and any empty directories resulting from it? Moving the CSS somewhere else is not a viable option unfortunately. |
I took a look around the code. I think this could be a clean implementation:
I'd be happy to attempt a contribution. Would you be willing to accept it? Do you have any alternative suggestions? |
Yeah, I like the idea of giving sync-content a filter on which files to care about. Maybe a glob pattern or regexp or something. |
I have a watch script that runs
tshy --watch
and some CSS compilation in parallel. In the output (dist/esm
anddist/commonjs
), js files live alongside CSS files. In my normal build script, I simply execute tshy before the CSS compilation, but when in watch mode, tshy detects a filesystem change when a CSS file is written, and then proceeds to remove it. I would like for tshy to leave these files untouched. A reasonable opt-in setting would be okay for me.The text was updated successfully, but these errors were encountered: