Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Clean flag for builds #977

@WalkerCodeRanger

Description

@WalkerCodeRanger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions