Clean flag for builds
See original GitHub issueI 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.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Go clean – cleaning your build directory - Packt Subscription
The -cache flag removes the entire go build cache. This can be helpful if you're trying to compare a fresh build across multiple...
Read more >How to Clean an Outdoor Flag
If you choose to hand wash your outdoor flag, make sure to use tepid water and oxygen-based bleach. Allowing the flag to soak...
Read more >How to Wash or Clean the American Flag - The Spruce
The safest way to wash a multi-colored flag is to handwash in cool water with a mild laundry detergent. If you are unsure...
Read more >How to Care for Your Fabric Flag - ExpoCart
To keep your flag in tip-top shape, regularly wash in warm water with gentle soap, without soaking, and rinse and naturally dry immediately...
Read more >Caring for Your American Flag - YouTube
... teaches the basics of flag care. Learn how to maintain the life of your American Flag and learn the proper method to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ll try to focus on the feature as a part of 2.7 release (mid apr)
@ysle no, we have not worked on this yet, but we will eventually
Implementation wise, adding an artifact file (where to? root? public?) might not be the cleanest solution, but then, there doesn’t seem to be a different option for tracking which files were produced by brunch and which were not.
Should the cleaning happen only during initial start and not through the run time of watch?
Also, this will still leave files in public generated by brunch plugins (in
onCompile
for example).@paulmillr @es128 do you have any thoughts regarding this?