2020-05-17 15:36:57 +02:00
|
|
|
const fs = require("fs").promises;
|
2021-02-02 11:39:54 +01:00
|
|
|
const getTheme = require("./classic/theme");
|
2021-02-02 14:32:30 +01:00
|
|
|
const getDotcomTheme = require("./dotcom/theme");
|
2020-04-23 18:04:44 +02:00
|
|
|
|
2021-02-02 14:32:30 +01:00
|
|
|
// Classic
|
|
|
|
|
|
|
|
const classicLight = getTheme({
|
2021-01-23 07:29:05 +01:00
|
|
|
style: "light",
|
2020-04-27 04:42:15 +02:00
|
|
|
name: "GitHub Light",
|
|
|
|
});
|
2020-04-23 18:04:44 +02:00
|
|
|
|
2021-02-02 14:32:30 +01:00
|
|
|
const classicDark = getTheme({
|
2021-01-23 07:29:05 +01:00
|
|
|
style: "dark",
|
2020-04-27 04:42:15 +02:00
|
|
|
name: "GitHub Dark",
|
|
|
|
});
|
2020-05-17 15:36:57 +02:00
|
|
|
|
2021-02-02 14:32:30 +01:00
|
|
|
// Dotcom
|
|
|
|
|
|
|
|
const dotcomLight = getDotcomTheme({
|
|
|
|
theme: "light",
|
|
|
|
name: "GitHub.com Light",
|
|
|
|
});
|
|
|
|
|
|
|
|
const dotcomDark = getDotcomTheme({
|
|
|
|
theme: "dark",
|
|
|
|
name: "GitHub.com Dark",
|
|
|
|
});
|
|
|
|
|
2021-03-16 20:38:21 +01:00
|
|
|
const dotcomDimmed = getDotcomTheme({
|
|
|
|
theme: "dimmed",
|
|
|
|
name: "Github.com Dimmed"
|
|
|
|
})
|
|
|
|
|
2021-02-02 14:32:30 +01:00
|
|
|
// Write themes
|
|
|
|
|
2020-05-19 19:10:01 +02:00
|
|
|
fs.mkdir("./themes", { recursive: true })
|
|
|
|
.then(() => Promise.all([
|
2021-02-02 14:32:30 +01:00
|
|
|
fs.writeFile("./themes/classic-light.json", JSON.stringify(classicLight, null, 2)),
|
|
|
|
fs.writeFile("./themes/classic-dark.json", JSON.stringify(classicDark, null, 2)),
|
|
|
|
fs.writeFile("./themes/dotcom-light.json", JSON.stringify(dotcomLight, null, 2)),
|
|
|
|
fs.writeFile("./themes/dotcom-dark.json", JSON.stringify(dotcomDark, null, 2)),
|
2021-03-16 20:38:21 +01:00
|
|
|
fs.writeFile("./themes/dotcom-dimmed.json", JSON.stringify(dotcomDimmed, null, 2))
|
2020-05-19 19:10:01 +02:00
|
|
|
]))
|
|
|
|
.catch(() => process.exit(1))
|