Skip to content

Commit

Permalink
feat: new build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
makamekm committed Oct 25, 2024
1 parent 96f3949 commit 5d21c0e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export async function updateMetaFile(
const changed = !cached || !metaFiles[pathToAsset];
const modDate = Number((await stat(from)).mtime);
metaFiles[pathToAsset] = {
mod_date: changed ? modDate : (metaFiles[pathToAsset]?.mod_date ?? modDate),
modifyedDate: changed
? modDate
: (metaFiles[pathToAsset]?.modifyedDate ?? modDate),
dependencies: metaFiles[pathToAsset]?.dependencies || {},
changed,
};
Expand Down Expand Up @@ -83,13 +85,13 @@ export async function updateChangedMetaFile(
if (metaFiles[pathToAsset] && !metaFiles[pathToAsset].changed) {
const from = resolve(inputFolderPath, pathToAsset);
const modDateNullable = await getFileModifiedDate(from);
const modDate = modDateNullable ?? metaFiles[pathToAsset].mod_date;
const modDate = modDateNullable ?? metaFiles[pathToAsset].modifyedDate;

metaFiles[pathToAsset].changed =
!cached ||
!modDateNullable ||
isFileModified(modDate, metaFiles[pathToAsset].mod_date);
metaFiles[pathToAsset].mod_date = modDate;
isFileModified(modDate, metaFiles[pathToAsset].modifyedDate);
metaFiles[pathToAsset].modifyedDate = modDate;
}
},
META_ACTIVE_QUEUE_LENGTH,
Expand Down

0 comments on commit 5d21c0e

Please sign in to comment.