-
Notifications
You must be signed in to change notification settings - Fork 0
/
_starter.ts
45 lines (40 loc) · 1.86 KB
/
_starter.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { cwd } from 'process';
import Runner from './runner';
const baseDir = cwd();
const start = async () => {
const runner = new Runner({
pathToLocalizedContent: `${baseDir}/external/translated-content/files`,
pathToOriginalContent: `${baseDir}/external/original-content/files`,
pathToCache: `${baseDir}/cache/`,
sourceLocale: 'en-US',
targetLocale: 'uk',
redirectMap: {
// some test redirects
'/uk/docs/Web/JavaScript/Reference/Operators/Pipeline_operator':
'/uk/docs/Web/JavaScript/Reference/Operators/',
'/uk/docs/Web/JavaScript/Reference/Operators/Spread_operator':
'/uk/docs/Web/JavaScript/Reference/Operators/Spread_syntax',
'/uk/docs/Web/JavaScript/Reference/Operators/constructor':
'/uk/docs/Web/JavaScript/Reference/Classes/constructor',
'/uk/docs/Web/JavaScript/Reference/Operators/extends':
'/uk/docs/Web/JavaScript/Reference/Classes/extends',
'/uk/docs/Web/JavaScript/Reference/Operators/get':
'/uk/docs/Web/JavaScript/Reference/Functions/get',
'/uk/docs/Web/JavaScript/Reference/Operators/set':
'/uk/docs/Web/JavaScript/Reference/Functions/set',
'/uk/docs/Web/JavaScript/Reference/PaymentValidationErrors':
'/uk/docs/Web/API/PaymentResponse/retry',
'/uk/docs/Web/JavaScript/Reference/Properties_Index':
'/uk/docs/Web/JavaScript/Reference',
'/uk/docs/Web/JavaScript/Reference/Reserved_Words':
'/uk/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords',
'/uk/docs/Web/JavaScript/Reference/Spread_operator':
'/uk/docs/Web/JavaScript/Reference/Operators/Spread_syntax',
'/uk/docs/Web/JavaScript/Reference/Statements/Legacy_generator_function':
'/uk/docs/Web/JavaScript/Reference/Deprecated_and_obsolete_features',
},
});
await runner.init();
console.log('done processing files');
};
start();