Hint enabling cache if not already enabled.

This commit is contained in:
Webber
2020-01-27 23:02:32 +01:00
committed by Webber Takken
parent 37d5ce498f
commit fe2311ef4b
5 changed files with 37 additions and 3 deletions

23
src/model/cache.js Normal file
View File

@@ -0,0 +1,23 @@
import fs from 'fs';
import Action from './action';
import Project from './project';
class Cache {
static verify() {
if (!fs.existsSync(Project.libraryFolder)) {
this.notifyAboutCachingPossibility();
}
}
static notifyAboutCachingPossibility() {
if (Action.isRunningLocally) {
return;
}
console.log('Library folder does not exist.');
console.log('Consider setting up caching to speed up your workflow.');
console.log('If this is not your first build.');
}
}
export default Cache;