!355 update: aceCompileMode

Merge pull request !355 from laibo102/master-temp-compileMode
This commit is contained in:
openharmony_ci
2022-03-14 07:31:20 +00:00
committed by Gitee
+3 -2
View File
@@ -32,6 +32,7 @@ configure({
const logger = getLogger('ETS');
const staticPreviewPage = process.env.aceStaticPreview;
const aceCompileMode = process.env.aceCompileMode || 'page';
const abilityConfig = {
abilityType: process.env.abilityType || 'page',
abilityEntryFile: null,
@@ -64,7 +65,7 @@ function initProjectConfig(projectConfig) {
function loadEntryObj(projectConfig) {
let manifest = {};
initProjectConfig(projectConfig);
if (process.env.aceManifestPath) {
if (process.env.aceManifestPath && aceCompileMode === 'page') {
setEntryFile(projectConfig);
setFaTestRunnerFile(projectConfig);
}
@@ -141,7 +142,7 @@ function setEntryFile(projectConfig) {
const entryFileRealPath = entryFileName + extendFile;
const entryFilePath = path.resolve(projectConfig.projectPath, entryFileRealPath);
abilityConfig.abilityEntryFile = entryFilePath;
if (!fs.existsSync(entryFilePath)) {
if (!fs.existsSync(entryFilePath) && aceCompileMode === 'page') {
throw Error(`\u001b[31m ERROR: missing ${entryFilePath}. \u001b[39m`).message;
}
projectConfig.entryObj[`./${entryFileName}`] = entryFilePath + '?entry';