mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-12-22 20:42:17 -06:00
add verbose to cli
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const { exec } = require('child_process')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { verbose } = require('./verbose.js')
|
||||
|
||||
module.exports = (envs = {}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -15,6 +16,8 @@ module.exports = (envs = {}) => {
|
||||
}
|
||||
|
||||
// pass envs to build
|
||||
verbose('🗣️ Build Env: ', envs)
|
||||
|
||||
exec(`npm run build`, { env: envs, cwd: path.join(__dirname, '..', '..') }, (err, stdout) => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
@@ -34,6 +37,7 @@ module.exports = (envs = {}) => {
|
||||
|
||||
const verifyViteInstallation = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
verbose('🗣️ Verifying Vite installation')
|
||||
exec(`vite --v`, (err) => {
|
||||
if (!err) return resolve()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user