提交 fb9ed2de 编写于 作者: fxy060608's avatar fxy060608

fix(qa): getProjectName

上级 303991e8
......@@ -21,9 +21,10 @@ const LINK_MODE = {
function getProjectName(e, t) {
try {
const r = _path.default.join(e, t, "manifest.json"),
s = require(r);
return s && s.package || "Bundle"
const stripJsonComments = require('strip-json-comments');
const r = _path.default.join(e, t, "manifest.json");
const s = JSON.parse(stripJsonComments(_fs.default.readFileSync(r).toString()))
return s && s.quickapp && s.quickapp.package || "Bundle"
} catch (e) {
_sharedUtils.colorconsole.error(`### App Server ### 获取项目名称出错:${e.message}`)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册