Minor updates
This commit is contained in:
parent
b1f009cdce
commit
6269cec4f1
2 changed files with 4 additions and 9 deletions
|
@ -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`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue