Skip to content

Commit

Permalink
Fix: Refactor CacheManager to use cachepath grunt option internally (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
taylortom authored Sep 27, 2024
1 parent 22a6d9c commit f1bcd40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions grunt/helpers/CacheManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ module.exports = class CacheManager {
}

get tempPath() {
const tempPath = path.join(os.tmpdir(), 'adapt_framework');
return tempPath;
return this.grunt.option('cachepath') ?? path.join(os.tmpdir(), 'adapt_framework');
}

cachePath(basePath, outputFilePath = process.cwd()) {
Expand Down
2 changes: 1 addition & 1 deletion grunt/tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module.exports = function(grunt) {
const options = this.options({});
const isSourceMapped = Boolean(options.generateSourceMaps);
const basePath = path.resolve(cwd + '/' + options.baseUrl).replace(convertSlashes, '/') + '/';
const cachePath = buildConfig.cachepath ?? cacheManager.cachePath(cwd, options.out);
const cachePath = cacheManager.cachePath(cwd, options.out);
if (!isDisableCache) {
grunt.log.ok(`Cache path: ${cachePath}`);
}
Expand Down

0 comments on commit f1bcd40

Please sign in to comment.