!383 optimize cache path.

Merge pull request !383 from lihong/cherry-pick-1647317603
This commit is contained in:
openharmony_ci
2022-03-15 09:18:41 +00:00
committed by Gitee
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -57,6 +57,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) {
+5 -1
View File
@@ -123,7 +123,8 @@ function initConfig(config) {
});
if (!/ets_loader_ark$/.test(__dirname)) {
config.cache = {
type: "filesystem"
type: "filesystem",
cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache')
};
}
}
@@ -148,6 +149,9 @@ function setProjectConfig(envArgs) {
if (envArgs.aceModuleJsonPath) {
projectConfig.aceModuleJsonPath = envArgs.aceModuleJsonPath;
}
if (envArgs.cachePath) {
projectConfig.cachePath = envArgs.cachePath;
}
}
function setReleaseConfig(config) {