mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 03:55:23 -04:00
!355 update: aceCompileMode
Merge pull request !355 from laibo102/master-temp-compileMode
This commit is contained in:
+3
-2
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user