Skip to content

Commit

Permalink
fix theme variants
Browse files Browse the repository at this point in the history
  • Loading branch information
chaseadamsio committed Jul 6, 2019
1 parent b6586bf commit 7447bea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/generate-pkg-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ module.exports = themeInfo => ({
path: `./neon-night-theme.json`
},
{
label: `Neon Night - No Bold`,
label: `Neon Night (No Bold)`,
uiTheme: `vs-dark`,
path: `./neon-night-no-bold-theme.json`
},
{
label: `Neon Night - No Italic`,
label: `Neon Night (No Italic)`,
uiTheme: `vs-dark`,
path: `./neon-night-no-italic-theme.json`
},
{
label: `Neon Night - No Font Styles`,
label: `Neon Night - (No Font Styles)`,
uiTheme: `vs-dark`,
path: `./neon-night-no-style-theme.json`
}
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const pkgJSON = require(`./generate-pkg-json`);
const palette = require(`./palette`);
const themeInfo = {
name: `neon-night`,
displayName: `Neon Night`,
variant: ``
displayName: `Neon Night`
};

const themePath = (variant /*: ?string */) => {
const name = variant ? `${themeInfo.name}-${variant}` : themeInfo.name;
console.log(`writing file ${name}-theme.json`);
return path.resolve(__dirname, `..`, `themes`, `${name}-theme.json`);
};

Expand Down Expand Up @@ -41,25 +41,25 @@ const main = async function(themePath, themeInfo, fontStyleEnabled) {
};

// default
main(themePath, themeInfo, { italic: true, bold: true });
main(themePath, { ...themeInfo, variant: `` }, { italic: true, bold: true });

// no font style
main(
themePath,
{ variant: `no-style`, ...themeInfo },
{ ...themeInfo, variant: `no-style` },
{ italic: false, bold: false }
);

// no bold style
main(
themePath,
{ variant: `no-bold`, ...themeInfo },
{ ...themeInfo, variant: `no-bold` },
{ italic: true, bold: false }
);

// no italic style
main(
themePath,
{ variant: `no-italic`, ...themeInfo },
{ ...themeInfo, variant: `no-italic` },
{ italic: false, bold: true }
);

0 comments on commit 7447bea

Please sign in to comment.