mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-12-19 19:42:19 -06:00
add path api to CLI
This commit is contained in:
@@ -2,7 +2,7 @@ const { exec } = require('child_process')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = () => {
|
||||
module.exports = (envs = {}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log('📦 Build start')
|
||||
console.time('📦 Build complete')
|
||||
@@ -13,7 +13,8 @@ module.exports = () => {
|
||||
console.timeEnd('📦 Remove dist folder')
|
||||
}
|
||||
|
||||
exec('npm run build', { cwd: path.join(__dirname, '..', '..') }, (err, stdout) => {
|
||||
// pass envs to build
|
||||
exec(`npm run build`, { env: envs, cwd: path.join(__dirname, '..', '..') }, (err, stdout) => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
reject(err)
|
||||
|
||||
Reference in New Issue
Block a user