File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ DIR="."
3434
3535# ── Keyword groups ───────────────────────────────────────────────────────────
3636KW_INSTALL=" prerequisite|require|depend|install|setup|set.up|set-up|getting.started|quick.start|quickstart"
37- KW_RUN=" usage|running|run|start|develop|dev.server|launch"
37+ KW_RUN=" usage|running|run|start|develop|dev.server|launch|command "
3838KW_TEST=" test|spec"
3939KW_EXTRA=" build|configuration|config|environment|deploy"
4040
Original file line number Diff line number Diff line change 1+ # my-astro-site
2+
3+ Code for my website.
4+
5+ ## Commands
6+
7+ | Command | Action |
8+ | :------------------ | :----------------------------------------------- |
9+ | ` npm i ` | Installs dependencies |
10+ | ` npm run dev ` | Starts local dev server at ` localhost:4321 ` |
11+ | ` npm run build ` | Build your production site to ` ./dist/ ` |
12+ | ` npm run preview ` | Preview your build locally, before deploying |
13+ | ` npm run lint ` | Lint code with eslint |
14+ | ` npm run format ` | Format with Prettier |
15+ | ` npm run astro ... ` | Run CLI commands like ` astro add ` , ` astro check ` |
Original file line number Diff line number Diff line change @@ -617,6 +617,29 @@ setup() {
617617 [[ " $output " == * " npm install" * ]]
618618}
619619
620+ # ── Table commands ───────────────────────────────────────────────────────────
621+
622+ @test " table: extracts backtick commands from table rows" {
623+ run " $HDI " --raw " $FIXTURES /table-commands"
624+ [ " $status " -eq 0 ]
625+ [[ " $output " == * " npm i" * ]]
626+ [[ " $output " == * " npm run dev" * ]]
627+ [[ " $output " == * " npm run build" * ]]
628+ }
629+
630+ @test " table: 'Commands' heading matches run mode" {
631+ run " $HDI " run --raw " $FIXTURES /table-commands"
632+ [ " $status " -eq 0 ]
633+ [[ " $output " == * " npm run dev" * ]]
634+ }
635+
636+ @test " table: does not extract non-command text from table cells" {
637+ run " $HDI " --raw " $FIXTURES /table-commands"
638+ [ " $status " -eq 0 ]
639+ [[ " $output " != * " localhost" * ]]
640+ [[ " $output " != * " Installs dependencies" * ]]
641+ }
642+
620643# ── Interactive: copy to clipboard ───────────────────────────────────────────
621644
622645@test " interactive: 'c' copies highlighted command to clipboard" {
You can’t perform that action at this time.
0 commit comments