ves
Version:
A Powerful, Simple Vue Node Isomorphic Framework
15 lines (13 loc) • 439 B
JavaScript
;
const path = require('path');
const fs = require('fs');
const EggScriptCommand = require('egg-scripts');
const cliFilePath = path.join(process.cwd(), 'node_modules', 'ves-cli');
// fix when production mode, ves-cli not exists, start app error by ves start
if (fs.existsSync(cliFilePath)) {
const VesCLI = require(cliFilePath);
new VesCLI.Command().run();
} else {
new EggScriptCommand().start();
}