changed setup to require CLI modules directly

This commit is contained in:
Michael Shanks 2020-06-11 20:37:01 +01:00
parent eb178f3fac
commit 2ecb03e7ce
2 changed files with 9 additions and 5 deletions

View File

@ -4,10 +4,14 @@
// 3. Runs the server using said folder
const rimraf = require("rimraf")
const homedir = require("os").homedir() + "/.budibase-cypress"
const { execSync } = require("child_process")
const { join } = require("path")
const homedir = join(require("os").homedir(), ".budibase-cypress")
const init = require("../../cli/src/commands/init/initHandler")
const run = require("../../cli/src/commands/run/runHandler")
rimraf.sync(homedir)
execSync(`../../packages/cli/bin/budi init -d ${homedir}`)
execSync(`../../packages/cli/bin/budi run -d ${homedir}`)
init({ dir: homedir })
.then(() => {
run({ dir: homedir })
})

View File

@ -7,7 +7,7 @@ const Sqrl = require("squirrelly")
const uuid = require("uuid")
module.exports = opts => {
run(opts)
return run(opts)
}
const run = async opts => {