Build Vite Project !!
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!
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.
or use the JS Command api, see https://tauri.app/v1/api/js/shell#command