mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-18 16:04:32 -04:00
optimize cache path. Signed-off-by: lihong <lihong67@huawei.com> Change-Id: I16e096dec186067b1e8862aec6d38112946ffbe3
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user