docs(cli): fix render examples that pass a file as the project dir#1974
Draft
miguel-heygen wants to merge 1 commit into
Draft
docs(cli): fix render examples that pass a file as the project dir#1974miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
The render command's positional argument is the project directory (default "."), resolved via resolveProjectOrThrow; a specific composition file is passed with -c/--composition. Several docs showed `hyperframes render index.html` / `render ./my-composition.html`, which treats the HTML file as the project dir and fails with "Not a directory". Correct the guide and the cli README to render the project's index.html directly (or point at a file with -c).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
hyperframes rendertakes a project directory as its positional argument (default., resolved viaresolveProjectOrThrow); a specific composition file is selected with-c/--composition. But several docs showed the file as the positional argument:docs/guides/claude-design-hyperframes.md—npx hyperframes render index.html(twice)packages/cli/README.md—npx hyperframes render ./my-composition.html -o output.mp4Following those examples, the CLI treats the
.htmlfile as the project directory and fails withNot a directory. Users hit this and had to discover the correct invocation by trial and error.Fix
Docs-only. Correct the examples to render the project's
index.htmlfrom the project directory (npx hyperframes render -o output.mp4), and show-cfor pointing at a specific composition file. No code or behavior change.Verification
The contract is in
packages/cli/src/commands/render.ts(positionaldir= "Project directory",-c= "Render a specific composition file") andpackages/cli/src/utils/project.ts(resolveProjectOrThrowthrows"Not a directory: " + dirfor a file path). The corrected commands match the CLI's own built-inexamplesarray.