@aomi/webapp-cli
Version:
a web app cli
28 lines (27 loc) • 714 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWebappConfig = void 0;
const fs = require("fs");
const path = require("path");
/**
* @author 田尘殇Sean(sean.snow@live.com) create at 2018/10/4
*/
function getWebappConfig() {
const config = path.join(process.cwd(), `webapp.config.js`);
let userConfig = {};
try {
if (fs.lstatSync(config).isFile()) {
try {
userConfig = require(config);
}
catch (e) {
console.error(e.message, e);
process.exit(1);
}
}
}
catch (e) {
}
return userConfig;
}
exports.getWebappConfig = getWebappConfig;