optimize cache path.

Signed-off-by: lihong <lihong67@huawei.com>
Change-Id: I16e096dec186067b1e8862aec6d38112946ffbe3
This commit is contained in:
lihong
2022-03-15 12:09:53 +08:00
parent 34411a74d6
commit 2148666bc3
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -59,6 +59,8 @@ function initProjectConfig(projectConfig) {
projectConfig.hashProjectPath = projectConfig.hashProjectPath ||
hashProjectPath(projectConfig.projectPath)
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
@@ -117,7 +117,8 @@ function initConfig(config) {
});
if (!/ets_loader_ark$/.test(__dirname)) {
config.cache = {
type: "filesystem"
type: "filesystem",
cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache')
};
}
}
@@ -142,6 +143,9 @@ function setProjectConfig(envArgs) {
if (envArgs.aceModuleJsonPath) {
projectConfig.aceModuleJsonPath = envArgs.aceModuleJsonPath;
}
if (envArgs.cachePath) {
projectConfig.cachePath = envArgs.cachePath;
}
}
function setReleaseConfig(config) {