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

Build Vite Project !! #9736

Closed
quyphuc2111 opened this issue May 10, 2024 · 2 comments
Closed

Build Vite Project !! #9736

quyphuc2111 opened this issue May 10, 2024 · 2 comments

Comments

@quyphuc2111
Copy link

Hello Tauri devs,

I'm working on a Tauri application in the release folder. I need to execute the command:
.\Scorm-BKT.exe --i="D:\bkt-workspace\ScormProject\tauri-app\src-tauri\public\data.json".

In my Tauri app, I've successfully implemented the functionality to read data from a JSON file. Now, I want to integrate a feature where clicking a button in the frontend triggers the build process for a Vite project. This build process should export an HTML file based on the data read from the JSON file.

Can you assist me with achieving this?

I'm working on React + Vite + Tauri + Tailwind

Thank you!

@thep0y
Copy link
Contributor

thep0y commented May 10, 2024

Using only JavaScript or TypeScript might not be sufficient for this task. You can attempt to execute commands and retrieve their output using Rust's standard library std::process::Command. The output can then be passed to the frontend via an event using window.emit.

@amrbashir
Copy link
Member

or use the JS Command api, see https://tauri.app/v1/api/js/shell#command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants