Skip to content

Commit

Permalink
eliminate variable names (theme names) with hyphen, too much pain
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYinMD committed Dec 16, 2018
1 parent e676112 commit 66d96e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions palettes/palette.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<label for="theme-select">Which theme are you tweaking?</label>
<select id="theme-select">
<option value="sepia">Sepia</option>
<option value="sepia-from-cuttlefish">Sepia from Cuttlefish</option>
<option value="sepia-from-cuttlefish--serif">Sepia from Cuttlefish (serif)</option>
<option value="sepia-from-cuttlefishs-algae">Sepia from Cuttlefish's Algae</option>
<option value="cuttlefish">Sepia from Cuttlefish</option>
<option value="serif">Sepia from Cuttlefish (serif)</option>
<option value="algae">Sepia from Cuttlefish's Algae</option>
</select>
</header>
<section class="color-names">
Expand Down
10 changes: 7 additions & 3 deletions scripts/visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ const json = require('comment-json'); // this module supports json with comments
const themeName = process.argv[2];
const officialThemeName = {
sepia: 'Sepia',
'sepia-from-cuttlefish': 'Sepia from Cuttlefish'
cuttlefish: 'Sepia from Cuttlefish'
}[themeName];

if (!themeName || !officialThemeName)
throw "Please provide the name of the theme you're tweaking, options are: \n`npm visualize sepia`\n`npm visualize sepia-from-cuttlefish`";
if (!themeName || !officialThemeName) {
console.error(`Please provide the name of the theme you're tweaking, options are:
"npm run visualize sepia" for the theme "Sepia",
"npm run visualize cuttlefish" for the theme "Sepia from Cuttlefish"`);
process.exit();
}

const pathToUserSettings = require('./path-to-user-settings.js'); // vscode's user settings json file

Expand Down

0 comments on commit 66d96e9

Please sign in to comment.