Skip to content
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

feat: autogenerate CLI command docs #2535

Merged
merged 4 commits into from
Aug 12, 2024
Merged

Conversation

lucasfernog
Copy link
Member

No description provided.

@lucasfernog lucasfernog requested a review from a team as a code owner August 11, 2024 19:48
Copy link

netlify bot commented Aug 11, 2024

Deploy Preview for tauri-v2 ready!

Name Link
🔨 Latest commit aeb9ecc
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/66b9945271d4a60008a7f36a
😎 Deploy Preview https://deploy-preview-2535--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

socket-security bot commented Aug 11, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@tauri-apps/[email protected] filesystem, shell 0 243 kB tauri-apps-ci-user

View full report↗︎

@lucasfernog
Copy link
Member Author

Due to pnpm/pnpm#7002 it's tricky to automatically update the CLI before generating docs.. I suggest we let renovate handle that for us for now.

@vasfvitor vasfvitor linked an issue Aug 11, 2024 that may be closed by this pull request
}

function generateCommandDoc(command: string, level: number, subcommandList: Command[]): string {
const output = execSync(`pnpm tauri ${command} --help`)
Copy link
Contributor

Choose a reason for hiding this comment

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

This approach is kinda fragile whenever we change the layout of the help output but I don't think that will happen more than once.
Also running the binary just for the help output sounds weird when we have access to the docs/source code itself since we have tauri as a git submodule.

Is tauri auto generating the rustdocs/scheme and we can consume them the same way we do for the permissions and configs? If not is it not feasible to do so?

@tweidinger tweidinger merged commit 20063e2 into v2 Aug 12, 2024
3 checks passed
@tweidinger tweidinger deleted the feat/autogenerate-cli-commands branch August 12, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

Need generator for CLI reference page
2 participants