@travetto/compiler
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -22,3 +22,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.24" | ||
"version": "0.0.25" | ||
} |
@@ -9,2 +9,5 @@ import * as fs from 'fs'; | ||
const CACHE_DIR = process.env.TS_CACHE_DIR!; | ||
const CACHE_SEP = process.env.TS_CACHE_SEP!; | ||
export class SourceManager { | ||
@@ -16,3 +19,3 @@ private sourceMaps = new Map<string, { url: string, map: string, content: string }>(); | ||
constructor(private config: { cache?: boolean, cacheDir?: string } = {}) { | ||
Object.assign(config, { ... { cache: true, cacheDir: `${process.cwd()}/build` }, config }); | ||
Object.assign(config, { ... { cache: true }, config }); | ||
@@ -25,3 +28,3 @@ try { | ||
private resolveCacheName(fileName: string) { | ||
return `${this.config.cacheDir}/${fileName.replace(/[\/\\]/g, '_').replace('.ts', '.js')}`; | ||
return `${CACHE_DIR}/${fileName.replace(/[\/\\]/g, CACHE_SEP)}`; | ||
} | ||
@@ -28,0 +31,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26557
724