Skip to content

feat: adding in build flag#335

Merged
jaredwray merged 5 commits intomainfrom
feat-adding-in-build-flag
Mar 6, 2026
Merged

feat: adding in build flag#335
jaredwray merged 5 commits intomainfrom
feat-adding-in-build-flag

Conversation

@jaredwray
Copy link
Owner

@jaredwray jaredwray commented Mar 6, 2026

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feat: adding in build flag

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement to the serve command by adding a --build flag, allowing users to perform a one-time site build immediately before starting the development server. This provides greater flexibility for local development workflows. Additionally, it includes updates to the documentation for clarity and a minor styling improvement to the navigation sidebar for better usability.

Highlights

  • New --build flag for serve command: Introduced a new --build flag for the serve command, enabling a one-time site build before starting the local development server.
  • Enhanced serve command logic: Modified the serve command to integrate the new --build flag, ensuring the site is built if specified, and updated the --clean flag's applicability.
  • Documentation updates: Updated the CLI documentation to reflect the new --build flag and clarified how documentation pages are structured.
  • UI/UX Improvement: Applied CSS changes to the navigation sidebar to make it sticky and scrollable, improving the user experience for long navigation lists.
Changelog
  • site/docs/cli.md
    • Updated the description of the serve command to include the new --build flag.
    • Added a new row to the arguments table for the --build flag.
    • Modified the description of the --clean flag to apply with --build or --watch.
    • Added an example for using npx docula serve --build.
  • site/docs/multiple-pages.md
    • Clarified the explanation of how files in the docs directory become documentation pages and the role of index.md.
  • src/console.ts
    • Added the --build flag to the printHelp output for the serve command.
    • Initialized the build property to false in DoculaConsole's default arguments.
    • Implemented parsing logic for the -b and --build command-line arguments.
    • Added build: boolean to the DoculaConsoleArguments type definition.
  • src/docula.ts
    • Modified the serve command's execution logic to check for consoleProcess.args.build or consoleProcess.args.watch before initiating a build.
    • Ensured that this.watch is only called if consoleProcess.args.watch is true.
    • Moved await this.serve(this.options) to always execute after potential build operations.
  • templates/modern/css/styles.css
    • Added position: sticky, top, max-height, overflow-y, and align-self properties to the .nav-sidebar__list selector.
  • test/console.test.ts
    • Updated the expected number of help messages in printHelp test.
    • Added new test cases to verify correct parsing of -b and --build flags for the serve command.
    • Added a test to confirm build defaults to false when not provided.
  • test/docula.test.ts
    • Added a new integration test to confirm that the serve command correctly builds the site when the --build flag is used without --watch.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new --build flag for the serve command, which triggers a one-time build before starting the server. The implementation is well-structured, includes updates to documentation, and adds corresponding tests for both argument parsing and command execution. I've found a couple of issues: one related to a minor UI bug in the CSS for the sticky sidebar, and a more significant logical bug where the --clean flag's behavior with serve doesn't match the updated documentation, potentially leading to unexpected behavior. I've also suggested a small refactoring in the tests to reduce code duplication. Overall, this is a good feature addition with solid implementation, pending the resolution of the identified issues.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5c46065) to head (6a751c3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #335   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines         1249      1258    +9     
  Branches       360       368    +8     
=========================================
+ Hits          1249      1258    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray jaredwray merged commit 58fed5c into main Mar 6, 2026
7 checks passed
@jaredwray jaredwray deleted the feat-adding-in-build-flag branch March 6, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant