diff --git a/styles/src/buildLicenses.ts b/styles/src/buildLicenses.ts index 9827583aeb..2e1325044d 100644 --- a/styles/src/buildLicenses.ts +++ b/styles/src/buildLicenses.ts @@ -21,7 +21,7 @@ function parseAcceptedToml(file: string): string[] { function checkLicenses(themes: ThemeConfig[]) { for (const theme of themes) { if (!theme.licenseFile) { - throw Error(`Theme ${theme.name} should have a LICENSE files`) + throw Error(`Theme ${theme.name} should have a LICENSE file`) } } } diff --git a/styles/src/buildThemes.ts b/styles/src/buildThemes.ts index 7173f1cb0a..bba300989f 100644 --- a/styles/src/buildThemes.ts +++ b/styles/src/buildThemes.ts @@ -9,13 +9,6 @@ import { themes } from "./themes" const assetsDirectory = `${__dirname}/../../assets` const tempDirectory = fs.mkdtempSync(path.join(tmpdir(), "build-themes")) -function getColorSchemes() { - const colorSchemes: ColorScheme[] = themes.map((theme) => - createColorScheme(theme) - ) - return colorSchemes -} - // Clear existing themes function clearThemes(themeDirectory: string) { if (!fs.existsSync(themeDirectory)) { @@ -42,5 +35,7 @@ function writeThemes(colorSchemes: ColorScheme[], outputDirectory: string) { } } +const colorSchemes: ColorScheme[] = themes.map((theme) => createColorScheme(theme)) + // Write new themes to theme directory -writeThemes(getColorSchemes(), `${assetsDirectory}/themes`) +writeThemes(colorSchemes, `${assetsDirectory}/themes`)