mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-25 22:27:19 -04:00
!383 optimize cache path.
Merge pull request !383 from lihong/cherry-pick-1647317603
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user