mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Clean up code.
This commit is contained in:
@@ -231,18 +231,19 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}`
|
||||
|
||||
return partsOut.join(files.pathSep);
|
||||
}
|
||||
|
||||
// Checks if a file with the same path and hash was written by
|
||||
// the previous builder. If it was, it adds it to the cache.
|
||||
// It also makes sure the parent directories exist and are part of the cache.
|
||||
//
|
||||
// the previous builder. If it was, it adds it to the cache and makes
|
||||
// sure the parent directories exist and are part of the cache.
|
||||
//
|
||||
// Returns true if the file was already written
|
||||
usePreviousWrite (relPath, hash, sanitize) {
|
||||
relPath = this._normalizeFilePath(relPath, sanitize);
|
||||
this._ensureDirectory(files.pathDirname(relPath));
|
||||
|
||||
const previouslyWritten = this.previousWrittenHashes[relPath] === hash;
|
||||
|
||||
if (previouslyWritten) {
|
||||
this._ensureDirectory(files.pathDirname(relPath));
|
||||
this.writtenHashes[relPath] = hash;
|
||||
this.usedAsFile[relPath] = true;
|
||||
}
|
||||
|
||||
@@ -1168,7 +1168,6 @@ class Target {
|
||||
data: resource.data,
|
||||
cacheable: false,
|
||||
hash: resource.hash,
|
||||
sourcePath: resource.sourcePath,
|
||||
skipSri: !!resource.hash
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user