-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.ts
29 lines (24 loc) · 1009 Bytes
/
build.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
/*
Copyright 2024 New Vector Ltd.
Copyright 2023 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import type { Platform, Theme } from "./src/@types/index";
import * as setupStyleDictionary from "./src/setupStyleDictionary";
import { generateCssIndex } from "./src/utils/generateCssIndex";
import generateIconComponents from "./src/utils/generateIconComponents";
import { normalizeTokens } from "./src/utils/normalizeTokens";
const themes: Theme[] = ["light", "light-hc", "dark", "dark-hc"];
const platforms: Platform[] = ["web", "android", "ios"];
await normalizeTokens();
await generateIconComponents();
generateCssIndex();
for (const platform of platforms) {
for (const theme of themes) {
const sb = await setupStyleDictionary.themed(theme, platform);
sb.buildAllPlatforms();
}
const sb = await setupStyleDictionary.common(platform);
sb.buildAllPlatforms();
}