fix(core): fix caching issues
This commit is contained in:
15
scripts/postinstall.ts
Normal file
15
scripts/postinstall.ts
Normal file
@ -0,0 +1,15 @@
|
||||
// This file takes care of some postinstall actions like clearing the TypeScript cache.
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as path from 'path';
|
||||
|
||||
const run = async () => {
|
||||
const tsCacheDir = path.join(__dirname, '../tscache');
|
||||
const tsCacheFiles: string[] = await smartfile.fs.listFolders(tsCacheDir) as any;
|
||||
for(const dir of tsCacheFiles) {
|
||||
console.log(`Removing cache directory ${dir}`);
|
||||
let dirToRemove = path.join(tsCacheDir, dir);
|
||||
await smartfile.fs.removeSync(dirToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
Reference in New Issue
Block a user