Minor updates

Nate Butler created

Change summary

styles/src/buildLicenses.ts |  2 +-
styles/src/buildThemes.ts   | 11 +++--------
2 files changed, 4 insertions(+), 9 deletions(-)

Detailed changes

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`)
         }
     }
 }

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`)