-
-
Notifications
You must be signed in to change notification settings - Fork 721
Add comprehensive example applications documentation to AGENTS.md #12967
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
Add comprehensive example applications documentation to AGENTS.md #12967
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
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 PR adds comprehensive documentation for running example applications across the Oxc repository by introducing a new "🚀 Running Example Applications" section to AGENTS.md. The documentation helps AI assistants understand how to exercise and test all available example applications.
- Adds categorized documentation for 18 examples across 10 crates with usage patterns
- Provides quick start guide and development workflow tips
- Includes practical examples of test file creation and command-line usage patterns
| # Basic JavaScript/TypeScript parsing with AST display | ||
| cargo run -p oxc_parser --example parser [filename] [--ast] [--estree] [--comments] | ||
|
|
||
| # TypeScript JSX parsing demonstration |
Copilot
AI
Aug 10, 2025
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.
Extra trailing whitespace after 'demonstration'. Remove the trailing space.
| # TypeScript JSX parsing demonstration | |
| # TypeScript JSX parsing demonstration |
| # For JavaScript examples | ||
| echo "const x = 1; console.log(x);" > test.js | ||
|
|
||
| # For TypeScript examples |
Copilot
AI
Aug 10, 2025
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.
Extra trailing whitespace after 'examples'. Remove the trailing space.
| # For TypeScript examples | |
| # For TypeScript examples |
| #### Complete Compiler Examples (`oxc`) | ||
| ```bash | ||
| # Full compilation pipeline (parsing, semantic analysis, transformation, codegen) | ||
| cargo run -p oxc --example compiler --features="full" [filename] |
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.
The Cargo features flag syntax is incorrect. It should be either --features "full" (with a space, no equals sign) or --features=full (with equals sign, no quotes). The current syntax combines both approaches incorrectly.
# Correct options:
cargo run -p oxc --example compiler --features "full" [filename]
# or
cargo run -p oxc --example compiler --features=full [filename]| cargo run -p oxc --example compiler --features="full" [filename] | |
| cargo run -p oxc --example compiler --features "full" [filename] |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
This PR adds a new "🚀 Running Example Applications" section to
AGENTS.mdthat provides comprehensive documentation for running all example applications across the repository's crates.What's Added
The new section includes:
Quick Start Guide: Basic pattern for running examples with test file creation
Categorized Examples: All 18 examples organized by functionality across 10 crates:
oxc_parser)oxc_linter)oxc_semantic)oxc_codegen)oxc_transformer)oxc_minifier)oxc_formatter)oxc_isolated_declarations)oxc_regular_expression)oxc)Usage Patterns: Common patterns, file input handling, test file creation examples
Development Tips: Using
just watch, special requirements, and AI development guidanceExample Usage
The documentation shows AI assistants how to run examples like:
This enhancement makes the repository more accessible to AI assistants by providing clear instructions for exercising all the example applications that demonstrate Oxc's capabilities.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.