Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « incremental_webpack_compiler « helpers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 818266074904ccc725f46a60b7c0d1fa4def6e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { NoopCompiler, HistoryOnlyCompiler, IncrementalWebpackCompiler } = require('./compiler');
const log = require('./log');

module.exports = (recordHistory, enabled, historyFilePath, ttl) => {
  if (!recordHistory) {
    log(`Status – disabled`);
    return new NoopCompiler();
  }

  if (enabled) {
    log(`Status – enabled, ttl=${ttl}`);
    return new IncrementalWebpackCompiler(historyFilePath, ttl);
  }

  log(`Status – history-only`);
  return new HistoryOnlyCompiler(historyFilePath);
};