@editframe/assets 0.15.0-beta.15 → 0.15.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/idempotentTask.js +3 -1
- package/package.json +1 -1
package/dist/idempotentTask.js
CHANGED
|
@@ -12,6 +12,8 @@ const idempotentTask = ({
|
|
|
12
12
|
const tasks = {};
|
|
13
13
|
return async (rootDir, absolutePath, ...args) => {
|
|
14
14
|
const log = debug(`ef:${label}`);
|
|
15
|
+
const cacheDirRoot = path.join(rootDir, ".cache");
|
|
16
|
+
await mkdir(cacheDirRoot, { recursive: true });
|
|
15
17
|
log(`Running ef:${label} task for ${absolutePath} in ${rootDir}`);
|
|
16
18
|
if (absolutePath.includes("http")) {
|
|
17
19
|
const safePath = absolutePath.replace(/[^a-zA-Z0-9]/g, "_");
|
|
@@ -37,7 +39,7 @@ const idempotentTask = ({
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
const md5 = await md5FilePath(absolutePath);
|
|
40
|
-
const cacheDir = path.join(
|
|
42
|
+
const cacheDir = path.join(cacheDirRoot, md5);
|
|
41
43
|
log(`Cache dir: ${cacheDir}`);
|
|
42
44
|
await mkdir(cacheDir, { recursive: true });
|
|
43
45
|
const cachePath = path.join(cacheDir, filename(absolutePath, ...args));
|