mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-22 04:25:23 -04:00
@@ -56,6 +56,8 @@ function initProjectConfig(projectConfig) {
|
||||
projectConfig.aceSuperVisualPath = projectConfig.aceSuperVisualPath ||
|
||||
process.env.aceSuperVisualPath
|
||||
projectConfig.aceBuildJson = projectConfig.aceBuildJson || process.env.aceBuildJson;
|
||||
projectConfig.cachePath = projectConfig.cachePath || process.env.cachePath ||
|
||||
path.resolve(__dirname, 'node_modules/.cache');
|
||||
}
|
||||
|
||||
function loadEntryObj(projectConfig) {
|
||||
|
||||
@@ -39,9 +39,6 @@ function initConfig(config) {
|
||||
const projectPath = path.resolve(projectConfig.projectPath);
|
||||
Object.assign(config, {
|
||||
entry: projectConfig.entryObj,
|
||||
cache: {
|
||||
type: "filesystem"
|
||||
},
|
||||
watch: watchMode,
|
||||
watchOptions: {
|
||||
aggregateTimeout: 10,
|
||||
@@ -116,6 +113,12 @@ function initConfig(config) {
|
||||
new ResultStates()
|
||||
]
|
||||
});
|
||||
if (!/ets_loader_ark$/.test(__dirname)) {
|
||||
config.cache = {
|
||||
type: "filesystem",
|
||||
cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache')
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function setProjectConfig(envArgs) {
|
||||
@@ -138,6 +141,9 @@ function setProjectConfig(envArgs) {
|
||||
if (envArgs.aceModuleJsonPath) {
|
||||
projectConfig.aceModuleJsonPath = envArgs.aceModuleJsonPath;
|
||||
}
|
||||
if (envArgs.cachePath) {
|
||||
projectConfig.cachePath = envArgs.cachePath;
|
||||
}
|
||||
}
|
||||
|
||||
function setReleaseConfig(config) {
|
||||
|
||||
Reference in New Issue
Block a user