Add --clear parameter to the build command #4243
mauricioschenkel
started this conversation in
Enhancement Queue
Replies: 1 comment
-
|
That's a veeery old request: #19 There's a plugin by @kentaroi called eleventy-plugin-clean that likely works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to have a
--clearparameter in the build command (npx @11ty/eleventy). When this parameter is provided, the output folder (e.g.:_site) would be deleted before the build process starts.This would be useful when running builds locally after making changes that modify the output path of one or more pages. Without deleting the existing output folder the old links continue to work, serving the previous version of the page.
I know that it is possible to achieve the same behavior by creating a simple script that deletes the folder and run the build command afterwards, but it would be nice to have it as a standard option and it seems to me that this is not so complicated to implement.
I’ve checked the documentation and existing discussions but couldn’t find anything related to this. Sorry if this has already been discussed or implemented.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions