Skip to content

fix(readme.md): reorder installation steps in README.md#851

Open
Jah-yee wants to merge 1 commit intogoogle:mainfrom
Jah-yee:main
Open

fix(readme.md): reorder installation steps in README.md#851
Jah-yee wants to merge 1 commit intogoogle:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 13, 2026

Description

The markdown-it build requires dependencies in web_core like @a2ui/web_core: file:../../web_core. Without building web_core first, npm run build on the markdown-it project fails with missing dependency errors.

This PR reorders the installation steps so that web_core is built before markdown-it.

Before

# Install and build the Markdown renderer
cd renderers/markdown/markdown-it
npm install
npm run build

# Install and build the Web Core library
cd ../../web_core
npm install
npm run build

After

# Install and build the Web Core library (must be built first - markdown-it depends on it)
cd renderers/web_core
npm install
npm run build

# Install and build the Markdown renderer
cd ../markdown/markdown-it
npm install
npm run build

web_core must be built before markdown-it since markdown-it
depends on @a2ui/web_core via file:../../web_core
@google-cla
Copy link

google-cla bot commented Mar 13, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

@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 correctly reorders the installation steps in the README.md file to address a dependency issue where web_core must be built before markdown-it. The change is logical and well-explained. I have added one suggestion to improve the robustness of the shell commands provided in the documentation.

Comment on lines +137 to 145
# Install and build the Web Core library (must be built first - markdown-it depends on it)
cd renderers/web_core
npm install
npm run build

# Install and build the Web Core library
cd ../../web_core
# Install and build the Markdown renderer
cd ../markdown/markdown-it
npm install
npm run build
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better robustness and user experience, consider running the build commands for each package within a subshell (...). This prevents the cd command from changing the user's current directory and makes each step runnable independently from the project root. Chaining commands with && also ensures that subsequent commands only run if the previous ones succeed.

For example:

# Install and build the Web Core library (must be built first - markdown-it depends on it)
(cd renderers/web_core && npm install && npm run build)

# Install and build the Markdown renderer
(cd renderers/markdown/markdown-it && npm install && npm run build)

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant