Skip to content

Commit

Permalink
chore: Remove unused process module import in hostproject.js (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
viralgupta authored Aug 26, 2024
1 parent 6a60ebf commit 40a4fc4
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions src/modules/hostproject.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const process = require('process');
const spawnCommand = require('spawn-command');
const config = require('./config');
const utils = require('../utils');
Expand Down Expand Up @@ -26,26 +25,4 @@ module.exports.runCommand = async (commandKey) => {
});
});
}
}

module.exports.runApp = async () => {
let configObj = config.get();
let hostProject = configObj.cli ? configObj.cli.hostProject : undefined;

if (hostProject && hostProject.projectPath && hostProject.devCommand) {
return new Promise((resolve) => {
let projectPath = utils.trimPath(hostProject.projectPath);
let cmd = hostProject.devCommand;

utils.log(`Starting the host app: ${cmd} ...`);
const proc = spawnCommand(cmd, { stdio: 'inherit', cwd: projectPath});
proc.on('exit', (code) => {
utils.log(`Host app stopped with exit code: ${code}`);
resolve();
});
});
} else {
utils.error(`Missing host project configuration.`);
process.exit(1);
}
}
}

0 comments on commit 40a4fc4

Please sign in to comment.