diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js index 18e732e328afba929d5f5f4219ed5633d41fe2be..acb27354c929737a84e923c4841232964925ed3f 100644 --- a/extensions/theme-seti/build/update-icon-theme.js +++ b/extensions/theme-seti/build/update-icon-theme.js @@ -28,9 +28,12 @@ function getCommitSha(repoId, repoPath) { }); } -function download(urlString) { +function download(source) { + if (source.startsWith('.')) { + return readFile(source); + } return new Promise((c, e) => { - var _url = url.parse(urlString); + var _url = url.parse(source); var options = { host: _url.host, port: _url.port, path: _url.path, headers: { 'User-Agent': 'NodeJS' }}; var content = ''; https.get(options, function (response) { @@ -45,9 +48,25 @@ function download(urlString) { }); } -function downloadBinary(urlString, dest) { +function readFile(fileName) { return new Promise((c, e) => { - https.get(urlString, function (response) { + fs.readFile(fileName, function(err, data) { + if (err) { + e(err); + } else { + c(data.toString()); + } + }); + }); +} + +function downloadBinary(source, dest) { + if (source.startsWith('.')) { + return copyFile(source, dest); + } + + return new Promise((c, e) => { + https.get(source, function (response) { switch(response.statusCode) { case 200: var file = fs.createWriteStream(dest); @@ -75,6 +94,29 @@ function downloadBinary(urlString, dest) { }); } +function copyFile(fileName, dest) { + return new Promise((c, e) => { + var cbCalled = false; + function handleError(err) { + if (!cbCalled) { + e(err); + cbCalled = true; + } + } + var rd = fs.createReadStream(fileName); + rd.on("error", handleError); + var wr = fs.createWriteStream(dest); + wr.on("error", handleError); + wr.on("close", function() { + if (!cbCalled) { + c(); + cbCalled = true; + } + }); + rd.pipe(wr); + }); +} + function invertColor(color) { var res = '#'; for (var i = 1; i < 7; i+=2) { @@ -111,13 +153,23 @@ function getLanguageMappings() { return langToExt; } +//var font = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff'; +var font = '../../../seti-ui/styles/_fonts/seti/seti.woff'; + exports.copyFont = function() { - var fontURI = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti/seti.woff'; - return downloadBinary(fontURI, './icons/seti.woff'); + return downloadBinary(font, './icons/seti.woff'); }; +//var fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less'; +//var mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/icons/mapping.less'; +//var colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less'; + +var fontMappings = '../../../seti-ui/styles/_fonts/seti.less'; +var mappings = '../../../seti-ui/styles/icons/mapping.less'; +var colors = '../../../seti-ui/styles/ui-variables.less'; + exports.update = function () { - var fontMappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/_fonts/seti.less'; + console.log('Reading from ' + fontMappings); var def2Content = {}; var ext2Def = {}; @@ -192,7 +244,6 @@ exports.update = function () { def2Content['_' + match[1]] = match[2]; } - var mappings = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/icons/mapping.less'; return download(mappings).then(function (content) { var regex2 = /\.icon-(?:set|partial)\('([\w-\.]+)',\s*'([\w-]+)',\s*(@[\w-]+)\)/g; while ((match = regex2.exec(content)) !== null) { @@ -226,7 +277,7 @@ exports.update = function () { } } - var colors = 'https://raw.githubusercontent.com/jesseweed/seti-ui/master/styles/ui-variables.less'; + return download(colors).then(function (content) { var regex3 = /(@[\w-]+):\s*(#[0-9a-z]+)/g; while ((match = regex3.exec(content)) !== null) { diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff index f4d287a4eef975978822c597544240760e711aa3..7593ebf34aceb7eb18ebac9a2d42edb3519f34f7 100644 Binary files a/extensions/theme-seti/icons/seti.woff and b/extensions/theme-seti/icons/seti.woff differ diff --git a/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json index 599c23a99a4040de9698986faa7b783ae0064609..331a50eb96bb3b331127cf09122b22942c6e193c 100644 --- a/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -665,192 +665,216 @@ "fontCharacter": "\\E05C", "fontColor": "#6d8086" }, - "_sass_light": { + "_salesforce_light": { + "fontCharacter": "\\E05D", + "fontColor": "#ae6545" + }, + "_salesforce": { "fontCharacter": "\\E05D", + "fontColor": "#519aba" + }, + "_sass_light": { + "fontCharacter": "\\E05E", "fontColor": "#aac7a" }, "_sass": { - "fontCharacter": "\\E05D", + "fontCharacter": "\\E05E", "fontColor": "#f55385" }, "_sbt_light": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E05F", "fontColor": "#ae6545" }, "_sbt": { - "fontCharacter": "\\E05E", + "fontCharacter": "\\E05F", "fontColor": "#519aba" }, "_scala_light": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E060", "fontColor": "#33c1bb" }, "_scala": { - "fontCharacter": "\\E05F", + "fontCharacter": "\\E060", "fontColor": "#cc3e44" }, "_search": { - "fontCharacter": "\\E060" + "fontCharacter": "\\E061" }, "_settings": { - "fontCharacter": "\\E061" + "fontCharacter": "\\E062" }, "_shell_light": { - "fontCharacter": "\\E062", + "fontCharacter": "\\E063", "fontColor": "#b2a5a1" }, "_shell": { - "fontCharacter": "\\E062", + "fontCharacter": "\\E063", "fontColor": "#4d5a5e" }, "_slim_light": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E064", "fontColor": "#1c86cc" }, "_slim": { - "fontCharacter": "\\E063", + "fontCharacter": "\\E064", "fontColor": "#e37933" }, "_smarty_light": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E065", "fontColor": "#3434be" }, "_smarty": { - "fontCharacter": "\\E064", + "fontCharacter": "\\E065", "fontColor": "#cbcb41" }, "_spring_light": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E066", "fontColor": "#723eb6" }, "_spring": { - "fontCharacter": "\\E065", + "fontCharacter": "\\E066", "fontColor": "#8dc149" }, "_stylus_light": { - "fontCharacter": "\\E066", + "fontCharacter": "\\E067", "fontColor": "#723eb6" }, "_stylus": { - "fontCharacter": "\\E066", + "fontCharacter": "\\E067", "fontColor": "#8dc149" }, + "_sublime_light": { + "fontCharacter": "\\E068", + "fontColor": "#1c86cc" + }, + "_sublime": { + "fontCharacter": "\\E068", + "fontColor": "#e37933" + }, "_svg_light": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E069", "fontColor": "#5f8b3b" }, "_svg": { - "fontCharacter": "\\E067", + "fontCharacter": "\\E069", "fontColor": "#a074c4" }, "_swift_light": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06A", "fontColor": "#1c86cc" }, "_swift": { - "fontCharacter": "\\E068", + "fontCharacter": "\\E06A", "fontColor": "#e37933" }, "_terraform_light": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06B", "fontColor": "#5f8b3b" }, "_terraform": { - "fontCharacter": "\\E069", + "fontCharacter": "\\E06B", "fontColor": "#a074c4" }, "_tex_light": { - "fontCharacter": "\\E06A", + "fontCharacter": "\\E06C", "fontColor": "#2b2829" }, "_tex": { - "fontCharacter": "\\E06A", + "fontCharacter": "\\E06C", "fontColor": "#d4d7d6" }, "_time-cop": { - "fontCharacter": "\\E06B" + "fontCharacter": "\\E06D" }, "_todo": { - "fontCharacter": "\\E06C" + "fontCharacter": "\\E06E" }, "_twig_light": { - "fontCharacter": "\\E06D", + "fontCharacter": "\\E06F", "fontColor": "#723eb6" }, "_twig": { - "fontCharacter": "\\E06D", + "fontCharacter": "\\E06F", "fontColor": "#8dc149" }, "_typescript_light": { - "fontCharacter": "\\E06E", + "fontCharacter": "\\E070", "fontColor": "#ae6545" }, "_typescript": { - "fontCharacter": "\\E06E", + "fontCharacter": "\\E070", "fontColor": "#519aba" }, "_vala_light": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E071", "fontColor": "#927f79" }, "_vala": { - "fontCharacter": "\\E06F", + "fontCharacter": "\\E071", "fontColor": "#6d8086" }, "_video_light": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E072", "fontColor": "#aac7a" }, "_video": { - "fontCharacter": "\\E070", + "fontCharacter": "\\E072", "fontColor": "#f55385" }, + "_vue_light": { + "fontCharacter": "\\E073", + "fontColor": "#bc94db" + }, + "_vue": { + "fontCharacter": "\\E073", + "fontColor": "#436b24" + }, "_windows_light": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E074", "fontColor": "#ae6545" }, "_windows": { - "fontCharacter": "\\E071", + "fontCharacter": "\\E074", "fontColor": "#519aba" }, "_word_light": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E075", "fontColor": "#ae6545" }, "_word": { - "fontCharacter": "\\E072", + "fontCharacter": "\\E075", "fontColor": "#519aba" }, "_xls_light": { - "fontCharacter": "\\E073", + "fontCharacter": "\\E076", "fontColor": "#723eb6" }, "_xls": { - "fontCharacter": "\\E073", + "fontCharacter": "\\E076", "fontColor": "#8dc149" }, "_xml_light": { - "fontCharacter": "\\E074", + "fontCharacter": "\\E077", "fontColor": "#1c86cc" }, "_xml": { - "fontCharacter": "\\E074", + "fontCharacter": "\\E077", "fontColor": "#e37933" }, "_yarn_light": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E078", "fontColor": "#ae6545" }, "_yarn": { - "fontCharacter": "\\E075", + "fontCharacter": "\\E078", "fontColor": "#519aba" }, "_yml_light": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E079", "fontColor": "#5f8b3b" }, "_yml": { - "fontCharacter": "\\E076", + "fontCharacter": "\\E079", "fontColor": "#a074c4" } }, @@ -938,13 +962,13 @@ "tf.json": "_terraform", "tex": "_tex", "sty": "_tex", - "cls": "_tex", "dtx": "_tex", "ins": "_tex", "txt": "_default", "twig": "_twig", "vala": "_vala", "vapi": "_vala", + "vue": "_vue", "ai": "_illustrator", "psd": "_photoshop", "pdf": "_pdf", @@ -958,6 +982,10 @@ "jpeg": "_image", "svg": "_svg", "svgx": "_image", + "sublime-project": "_sublime", + "sublime-workspace": "_sublime", + "component": "_salesforce", + "cls": "_salesforce", "fish": "_shell", "mov": "_video", "ogv": "_video", @@ -971,6 +999,7 @@ "babelrc": "_babel", "bowerrc": "_bower", "eslintrc": "_eslint", + "eslintignore": "_eslint", "jshintrc": "_javascript", "jscsrc": "_javascript", "direnv": "_config", @@ -1132,13 +1161,13 @@ "tf.json": "_terraform_light", "tex": "_tex_light", "sty": "_tex_light", - "cls": "_tex_light", "dtx": "_tex_light", "ins": "_tex_light", "txt": "_default_light", "twig": "_twig_light", "vala": "_vala_light", "vapi": "_vala_light", + "vue": "_vue_light", "ai": "_illustrator_light", "psd": "_photoshop_light", "pdf": "_pdf_light", @@ -1152,6 +1181,10 @@ "jpeg": "_image_light", "svg": "_svg_light", "svgx": "_image_light", + "sublime-project": "_sublime_light", + "sublime-workspace": "_sublime_light", + "component": "_salesforce_light", + "cls": "_salesforce_light", "fish": "_shell_light", "mov": "_video_light", "ogv": "_video_light", @@ -1165,6 +1198,7 @@ "babelrc": "_babel_light", "bowerrc": "_bower_light", "eslintrc": "_eslint_light", + "eslintignore": "_eslint_light", "jshintrc": "_javascript_light", "jscsrc": "_javascript_light", "direnv": "_config_light", @@ -1241,5 +1275,5 @@ "npm-debug.log": "_npm_ignored_light" } }, - "version": "https://github.com/jesseweed/seti-ui/commit/308379e91ac238b95e0680823a30eec08c05f3a6" + "version": "https://github.com/jesseweed/seti-ui/commit/f7e582faec0961ddf783ad4dffed41e0f2da5413" } \ No newline at end of file