tauri/cli/tauri.js/api/process.js
Lucas Fernandes Nogueira b95319bd74
feat(tauri.js) improve api module with type defs for each API fu… (#495)
* feat(tauri.js) improve api module with type defs for each API function

* chore(tauri) move endpoint specific modules

* refactor(tauri) move tcp mod to tauri_api

* feat(tauri) improve readDir signature, API features as kebab-case names

* fix(tauri) make event's payload optional

* feat(tauri) if invoke_handler fails, console.error the error message

* chore(api) improve JSDoc

* chore(tauri.js) update template

* chore(tauri) delete empty mod

* fix(tauri) tests and example with latest API signature
2020-03-09 18:44:19 -03:00

17 lines
354 B
JavaScript

import tauri from './tauri'
/**
* spawns a process
*
* @param {string} command the name of the cmd to execute e.g. 'mkdir' or 'node'
* @param {(string[]|string)} [args] command args
* @return {Promise<string>} promise resolving to the stdout text
*/
function execute (command, args) {
return tauri.execute(command, args)
}
export {
execute
}