Skip to content

Commit

Permalink
Merge pull request #102 from primer/dark
Browse files Browse the repository at this point in the history
Update GitHub Dark to match github.com
  • Loading branch information
simurai committed Jan 20, 2021
2 parents 7e4192f + 2c64c3b commit c4a98a6
Show file tree
Hide file tree
Showing 7 changed files with 335 additions and 338 deletions.
123 changes: 68 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"theme",
"github",
"light",
"dark"
"dark",
"dimmed"
],
"contributes": {
"themes": [
Expand All @@ -45,8 +46,8 @@
]
},
"devDependencies": {
"@primer/primitives": "^2.0.1",
"color": "^3.1.2",
"@primer/primitives": "0.0.0-2020111574337",
"chroma-js": "^2.1.0",
"nodemon": "^2.0.3"
},
"scripts": {
Expand Down
17 changes: 17 additions & 0 deletions src/colors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const lightColors = require("@primer/primitives/dist/json/colors/light.json");
const darkColors = require("@primer/primitives/dist/json/colors/dark.json");
const dimmedColors = require("@primer/primitives/dist/json/colors/dimmed.json");

function getColors(theme) {
if (theme === "light") {
return lightColors;
} else if (theme === "dark") {
return darkColors;
} else if (theme === "dimmed") {
return dimmedColors;
}
}

module.exports = {
getColors,
};
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ const fs = require("fs").promises;
const getTheme = require("./theme");

const lightTheme = getTheme({
style: "light",
theme: "light",
name: "GitHub Light",
});

const darkTheme = getTheme({
style: "dark",
theme: "dark",
name: "GitHub Dark",
});

// const dimmedTheme = getTheme({
// theme: "dimmed",
// name: "GitHub Dimmed",
// });

fs.mkdir("./themes", { recursive: true })
.then(() => Promise.all([
fs.writeFile("./themes/light.json", JSON.stringify(lightTheme, null, 2)),
fs.writeFile("./themes/dark.json", JSON.stringify(darkTheme, null, 2)),
// fs.writeFile("./themes/dimmed.json", JSON.stringify(dimmedTheme, null, 2)),
]))
.catch(() => process.exit(1))
24 changes: 0 additions & 24 deletions src/primer.js

This file was deleted.

22 changes: 0 additions & 22 deletions src/process.js

This file was deleted.

Loading

0 comments on commit c4a98a6

Please sign in to comment.