-
Notifications
You must be signed in to change notification settings - Fork 2
Dx tweaks #18
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
Dx tweaks #18
Conversation
- Introduced `Clean` property in `GenerationOptions` to control output directory cleaning before generation, defaulting to `false`. - Enhanced `SiteGenerator` to delete the output directory if `Clean` is enabled and it exists, with logging for the action. - Updated command-line help in `Program` to document the new `--clean` option. - Adjusted `options` initialization in `Program` to reflect the `Clean` property based on command-line arguments.
…arent level without checking children Improve logging and markdown file handling in SiteGenerator Refactor logging to remove messages for missing folders and no markdown files. Add a log entry for the count of markdown files found in each folder. Adjust logic to map templates only when markdown files are present, enhancing code clarity and functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a new "clean" option to the Blake site generator that allows users to delete the output directory before generating new content, along with improved logging for template mapping diagnostics.
- Added
--clean/-ccommand-line flag support with correspondingCleanproperty inGenerationOptions - Implemented output directory deletion functionality in
SiteGenerator.BuildAsyncwhen clean option is enabled - Enhanced template mapping logging to provide better visibility into the process, including file counts and folder processing status
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Blake.CLI/Program.cs | Added CLI help text and argument parsing for the new --clean/-c flags |
| src/Blake.BuildTools/Generator/SiteGenerator.cs | Implemented clean functionality and improved template mapping logging |
| src/Blake.BuildTools/Generator/GeneratorOptions.cs | Added Clean property to support the new feature |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
This pull request adds a new "clean" option to the site generation process, allowing users to delete the output directory before generating new site content. It also improves logging and template mapping diagnostics for better clarity during site generation.
New "Clean" Option:
Cleanproperty to theGenerationOptionsclass to allow users to specify if the output directory should be deleted before site generation.--cleanand-cflags. [1] [2]BuildAsyncmethod inSiteGeneratorto delete the output directory if theCleanoption is set and the directory exists, with appropriate logging.Template Mapping and Logging Improvements:
🧷 This PR will be released as a preview by default.
To trigger a stable release:
previewlabelreleaselabelSemver-MinororSemver-Majorto control version bump🏷️ Add labels to control release notes:
enhancement,bug,breaking-change,dependenciesignore-for-releaseto suppress it from notes