-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.js
65 lines (62 loc) · 2.17 KB
/
settings.js
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
const path = require('path');
const EACH_FOLDER_TOKEN = '__each_folder__';
module.exports = {
PARALLELISM_FACTOR: Number(process.env.PARALLELISM_FACTOR) || 4,
SHUTDOWN_TIMEOUT_SECONDS: 10,
CHILD_TERMINATE_TIMEOUT_SECONDS: 1.5,
PACKAGE_PREFIX: 'node',
BASE_FONT_FAMILY: 'Source Han Sans',
LOCALE_KEYWORDS: ['K', 'SC', 'HC', 'TC'],
HALF_WIDTH_KEYWORD: 'HW',
REGULAR_FONT_WIDTH_NAME: 'Regular',
/**
* Table based on the released README file from adobe-fonts/source-han-sans
* {@see SourceHanSansReadMe.pdf}
* @type {{ExtraLight: number, Light: number, Normal: number, Regular: number, Medium: number, Bold: number, Heavy: number}}
*/
FONT_WEIGHT_CONVERSION_TABLE: {
ExtraLight: 1, // This should be 0, but CSS font-weight values have to be at least 1
Light: 160,
Normal: 320,
Regular: 420,
Medium: 560,
Bold: 780,
Heavy: 1000,
},
CSS_BUILD_CONFIGURATIONS: {
all: { includeLocal: true, includeOtf: true, includeWoff2: true },
local: { includeLocal: true, includeOtf: false, includeWoff2: false },
otf: { includeLocal: false, includeOtf: true, includeWoff2: false },
woff2: { includeLocal: false, includeOtf: false, includeWoff2: true },
'local-otf': { includeLocal: true, includeOtf: true, includeWoff2: false },
'local-woff2': { includeLocal: true, includeOtf: false, includeWoff2: true },
'otf-woff2': { includeLocal: false, includeOtf: true, includeWoff2: true },
},
EACH_FOLDER_TOKEN,
ADDITIONAL_FILES: [
{
sourcePath: path.join(__dirname, 'source-han-sans', 'LICENSE.txt'),
targetRelativePath: `${EACH_FOLDER_TOKEN}/LICENSE`,
},
{
sourcePath: path.join(__dirname, '..', 'README.md'),
targetRelativePath: `${EACH_FOLDER_TOKEN}/README.md`,
},
// {
// sourcePath: path.join(__dirname, '..', '.npmrc.default'),
// targetRelativePath: `${EACH_FOLDER_TOKEN}/.npmrc`,
// },
],
RUN_CONFIGURATIONS: {
CLEAN_AND_RECREATE_FOLDERS: true,
COPY_FONT_FILES: true,
CONVERT_TO_WOFF2: true,
GENERATE_CSS: true,
GENERATE_PACKAGE_JSON: true,
COPY_ADDITIONAL_FILES: true,
// RUN_NPM_PUBLISH: {
// dryRun: false,
// },
},
};