You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
I know in this question on stack overflow one of the brunch contributors suggested using rm -rf public/ through npm scripts as the answer for the equivalent of a clean command. I really don't think that is a good answer. A tool like brunch should really support doing clean builds. Three options I can think of (in order from worst to best):
Production build should always do a clean and build, since production is the time it really matters if you have extra junk files.
Add a --clean flag to build
Since the output directory should only contain the output of the build, just delete any files that don't match the current output
The last seems to fit best with the brunch approach and would fit well with watch. So for example, I could rename an asset and brunch watch would copy the new asset over and realize that the old asset name was no longer part of the output and delete it.