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.

Clean flag for builds

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
paulmillrcommented, Mar 28, 2016

We’ll try to focus on the feature as a part of 2.7 release (mid apr)

0reactions
goshacmdcommented, May 13, 2016

@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?

Read more comments on GitHub >

github_iconTop 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 >

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