feat(tauri.js) run deps install after tauri init (#842)

* feat(tauri.js) run `deps install` after `tauri init`

* fix(tauri.js) await on installDependencies (tauri init)
This commit is contained in:
Lucas Fernandes Nogueira 2020-07-15 21:56:31 -03:00 committed by GitHub
parent f0ce94fc8e
commit 0591f1f945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"tauri.js": patch
---
Run the dependency manager's install script after `tauri init` succeeds.

View File

@ -11,6 +11,9 @@ const {
merge merge
} = require('lodash') } = require('lodash')
const toml = require('@tauri-apps/toml') const toml = require('@tauri-apps/toml')
const {
installDependencies
} = require('../dist/api/dependency-manager')
/** /**
* @type {object} * @type {object}
@ -116,7 +119,7 @@ if (argv.ci) {
}) })
} }
function runInit(config = {}) { async function runInit(config = {}) {
const { const {
appName, appName,
...configOptions ...configOptions
@ -153,4 +156,6 @@ function runInit(config = {}) {
} }
writeFileSync(manifestPath, toml.stringify(cargoManifest)) writeFileSync(manifestPath, toml.stringify(cargoManifest))
} }
await installDependencies()
} }