Skip to content
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

Enable "clean" action, and do it right (safely) #35

Open
briandominick opened this issue Feb 22, 2018 · 0 comments
Open

Enable "clean" action, and do it right (safely) #35

briandominick opened this issue Feb 22, 2018 · 0 comments

Comments

@briandominick
Copy link
Collaborator

Since it's possible to muck up one's build through disorderly preprocessing, yet since preprocessor files saved to the build directory can be safely cleared, it stands to reason that we should offer users the ability to erase their build dir prior to a new build. This is a standard option in build tools, though in our case it needn't do more than delete a build directory.

It should be invokable from the configuration itself, as well as from the CLI. Keep in mind there is no standard "build" directory, so it needs to be explicit.

Usage:

bundle exec liquidoc -c config.yml --clean _build

For now, this is accomplished manually with:

rm -rf _build; bundle exec liquidoc -c config.yml

Consider a safety requiring a flag such as --unsafe to allow operations below the pwd (probably Ruby prevents this by default?) and to delete certain subdirectories like content, src, source, _templates, etc, etc, etc, or maybe anything that doesn't have the word build in the path...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant