feat: add remark plugins for package-execute and package-run tabs#325
feat: add remark plugins for package-execute and package-run tabs#325arihantbansal wants to merge 6 commits intogillsdk:masterfrom
Conversation
|
| * - npm: npx codama run js | ||
| * - pnpm: pnpm dlx codama run js | ||
| * - yarn: yarn dlx codama run js | ||
| * - bun: bunx codama run js |
There was a problem hiding this comment.
For npx you probably want to add @latest here: npx codama@latest run js. Otherwise it'll use outdated dependencies if you run it, then a later version is released with updated dependencies. See npm/cli#4108
I know pnpx doesn't have this issue, but I'm unsure about the others. It's probably harmless to add @latest in any case though.
Problem
The gill docs use the Fumadocs framework, which provides a
package-installplugin for showing install commands across different package managers. However, there was no equivalent plugin for package manager run commands (likenpx codama run jsornpm run build). This made it difficult to show users the correct commands for different package managers when executing CLI tools or running scripts.Summary of Changes
@gillsdk/remark-package-commandswith two Remark plugins:remarkExecute- For registry execution commands (npx/dlx patterns)```package-execute codama run js ```npx codama run js,pnpm dlx codama run js,yarn dlx codama run js,bunx codama run jsremarkPackageRun- For local script execution (npm run patterns)```package-run build:docs ```npm run build:docs,pnpm run build:docs,yarn run build:docs,bun run build:docsThe implementation correctly distinguishes between registry execution (npx/pnpm dlx/yarn dlx/bunx) and local script execution (npm run/pnpm run/yarn run/bun run) as outlined in the issue requirements.
Fixes #169