diff options
| author | vaporstack <andrew@vaporstack.org> | 2018-02-12 13:54:38 -0500 |
|---|---|---|
| committer | vaporstack <andrew@vaporstack.org> | 2018-02-12 13:54:38 -0500 |
| commit | 8276e0308860b0fc364cc2e988499c2e2b921bf3 (patch) | |
| tree | d990cdc2a88c707593c791f348c722414f640e28 | |
| parent | da2e1452ebfa3c1b012866bfafe78a162ac0c68b (diff) | |
Removed backwards compatibility. Am providing deuveir.thm as an example of the upgraded format. Rerunning index.js will upgrade the rest, if it all checks out.
| -rw-r--r-- | index.js | 17 | ||||
| -rw-r--r-- | themes/deuveir.thm | 27 |
2 files changed, 20 insertions, 24 deletions
@@ -8,7 +8,7 @@ var html = "# Themes\nThis collection of themes are meant to be used with [Marab // would require to do 'theme = theme.data' in client apps // idea is tradeoff for authorship and versioning, potentially multiple codepaths // if, in the future, more colors are ever added -var generate_v2 = false; +//var generate_v2 = false; function build_svg(n,theme) { @@ -87,20 +87,9 @@ require("fs").readdirSync(normalizedPath).forEach(function(file_name) { if (!theme ){ return console.log(err); } build_svg(file_name, theme) html += build_theme(file_name, theme) + theme = upgrade_with_defaults(theme); - - if( generate_v2 ) - { - var v2dir = 'themes-v2'; - - if ( !fs.existsSync(v2dir)) - { - fs.mkdirSync(v2dir); - } - theme = upgrade_with_defaults(theme); - fs.writeFileSync(v2dir + path.sep + file_name, JSON.stringify(theme, null, 2)); - } - + fs.writeFileSync('themes' + path.sep + file_name, JSON.stringify(theme, null, 2)); }); }); diff --git a/themes/deuveir.thm b/themes/deuveir.thm index 0a630a8..1ce34fa 100644 --- a/themes/deuveir.thm +++ b/themes/deuveir.thm @@ -1,11 +1,18 @@ { - "background": "#141414", - "f_high": "#f4f4f4", - "f_med": "#efefef", - "f_low": "#3d3d3d", - "f_inv": "#141414", - "b_high": "#efefef", - "b_med": "#aa0000", - "b_low": "#000000", - "b_inv": "#3d3d3d" -} + "meta": { + "author": "deuveir", + "version": 2, + "revision": 1 + }, + "data": { + "background": "#141414", + "f_high": "#f4f4f4", + "f_med": "#efefef", + "f_low": "#3d3d3d", + "f_inv": "#141414", + "b_high": "#efefef", + "b_med": "#aa0000", + "b_low": "#000000", + "b_inv": "#3d3d3d" + } +}
\ No newline at end of file |
