Update
This commit is contained in:
rodič
62ce02883f
revize
9a881f3cbd
|
@ -113,7 +113,7 @@ class DeConf_Package {
|
||||||
await emptyDir(dir);
|
await emptyDir(dir);
|
||||||
await item.assetsWrite(
|
await item.assetsWrite(
|
||||||
dir,
|
dir,
|
||||||
[this.engine.publicUrl, this.id, "assets", colName, item.id].join(
|
[this.engine.publicUrl, this.id, "assets", colName].join(
|
||||||
"/",
|
"/",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -185,12 +185,12 @@ class DeConf_Collection {
|
||||||
|
|
||||||
async assetsWrite(outputDir, publicUrl) {
|
async assetsWrite(outputDir, publicUrl) {
|
||||||
for (const asset of this.assets) {
|
for (const asset of this.assets) {
|
||||||
const fn = this.data.index[asset];
|
if (!this.data.index[asset]) continue;
|
||||||
if (!fn) continue;
|
const fnIn = this.data.index[asset];
|
||||||
const dir = [outputDir, this.id].join("/");
|
const fnOut = [this.id, this.data.index[asset]].join("-");
|
||||||
await emptyDir(dir);
|
await emptyDir(outputDir);
|
||||||
await _fileCopy([this.dir, fn].join("/"), [dir, fn].join("/"));
|
await _fileCopy([this.dir, fnIn].join("/"), [outputDir, fnOut].join("/"));
|
||||||
const url = [publicUrl, fn].join("/");
|
const url = [publicUrl, fnOut].join("/");
|
||||||
this.data.index[asset] = url;
|
this.data.index[asset] = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu