From c6bb320be320880612aadb7f38742ed645d189bb Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 24 Mar 2022 15:50:38 +0800 Subject: [PATCH] 1.6.6 --- .gitignore | 1 + .vscodeignore | 9 +++-- CHANGELOG.md | 4 ++ data/logs/error.log | 59 ----------------------------- data/logs/out.log | 84 ----------------------------------------- package.json | 2 +- src/es.js | 7 +++- src/html.js | 37 +++++++++--------- themes/color-theme.json | 27 +++++++------ 9 files changed, 50 insertions(+), 180 deletions(-) delete mode 100644 data/logs/error.log delete mode 100644 data/logs/out.log diff --git a/.gitignore b/.gitignore index 9497f51..aabefc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .AppleDouble .LSOverride +data/ # Thumbnails diff --git a/.vscodeignore b/.vscodeignore index a7a44e4..0f84021 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,9 +1,10 @@ -.vscode/** -.vscode-test/** +.vscode/ +.vscode-test/ .gitignore .prettierrc.yaml -src -src/** + +src/ +data/ build.js app.yaml vsc-extension-quickstart.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4420826..fd04973 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +## [1.6.6] 2022-03-24 +- 优化vue自定义组件标签颜色, 指令颜色 +- html的`link, a, img, script`标签的地址, 改为灰色 + ## [1.6.5] 2022-03-16 - 修复jsx, tsx着色问题 - 支持js`?.` diff --git a/data/logs/error.log b/data/logs/error.log deleted file mode 100644 index 364e8f3..0000000 --- a/data/logs/error.log +++ /dev/null @@ -1,59 +0,0 @@ -/Volumes/extends/www/project/one-plain/src/es.js:105 - 'string.template.js meta.template.expression.js meta.array.literal.js meta.brace.square.js', - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -SyntaxError: Unexpected string - at wrapSafe (internal/modules/cjs/loader.js:915:16) - at Module._compile (internal/modules/cjs/loader.js:963:27) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) - at Module.load (internal/modules/cjs/loader.js:863:32) - at Function.Module._load (internal/modules/cjs/loader.js:708:14) - at Module.require (internal/modules/cjs/loader.js:887:19) - at require (internal/modules/cjs/helpers.js:74:18) - at Object. (/Volumes/extends/www/project/one-plain/build.js:14:12) - at Module._compile (internal/modules/cjs/loader.js:999:30) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) -/Volumes/extends/www/project/one-plain/src/es.js:20 - 'meta.import.ts string.quoted.double.ts' - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -SyntaxError: Unexpected string - at wrapSafe (internal/modules/cjs/loader.js:915:16) - at Module._compile (internal/modules/cjs/loader.js:963:27) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) - at Module.load (internal/modules/cjs/loader.js:863:32) - at Function.Module._load (internal/modules/cjs/loader.js:708:14) - at Module.require (internal/modules/cjs/loader.js:887:19) - at require (internal/modules/cjs/helpers.js:74:18) - at Object. (/Volumes/extends/www/project/one-plain/build.js:14:12) - at Module._compile (internal/modules/cjs/loader.js:999:30) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) -/Volumes/extends/www/project/one-plain/src/es.js:20 - 'meta.import.ts string.quoted.double.ts' - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -SyntaxError: Unexpected string - at wrapSafe (internal/modules/cjs/loader.js:915:16) - at Module._compile (internal/modules/cjs/loader.js:963:27) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) - at Module.load (internal/modules/cjs/loader.js:863:32) - at Function.Module._load (internal/modules/cjs/loader.js:708:14) - at Module.require (internal/modules/cjs/loader.js:887:19) - at require (internal/modules/cjs/helpers.js:74:18) - at Object. (/Volumes/extends/www/project/one-plain/build.js:14:12) - at Module._compile (internal/modules/cjs/loader.js:999:30) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) -readline.js:228 - input.on('data', ondata); - ^ - -TypeError: Cannot read property 'on' of undefined - at new Interface (readline.js:228:11) - at Object.createInterface (readline.js:92:10) - at Object. (/Volumes/extends/www/project/one-plain/build.js:37:10) - at Module._compile (internal/modules/cjs/loader.js:999:30) - at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) - at Module.load (internal/modules/cjs/loader.js:863:32) - at Function.Module._load (internal/modules/cjs/loader.js:708:14) - at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) - at internal/main/run_main_module.js:17:47 diff --git a/data/logs/out.log b/data/logs/out.log deleted file mode 100644 index 20269b9..0000000 --- a/data/logs/out.log +++ /dev/null @@ -1,84 +0,0 @@ -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... -Build complete... diff --git a/package.json b/package.json index a960ba7..971ec57 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "one plain", "description": "🔥 米白色主题", "icon": "logo.png", - "version": "1.6.5", + "version": "1.6.6", "publisher": "yutent", "author": "Yutent [@yutent]", "engines": { diff --git a/src/es.js b/src/es.js index 7001259..e16b00d 100644 --- a/src/es.js +++ b/src/es.js @@ -118,6 +118,8 @@ module.exports = [ scope: [ 'meta.object.member meta.array.literal meta.brace.square', 'meta.object.member meta.arrow meta.brace.round', + 'text.html.vue-html meta.brace.round', + 'text.html.vue-html meta.directive.vue', 'string.template meta.template.expression meta.array.literal meta.brace.square', 'string.template meta.template.expression meta.brace.round', 'meta.tag.attributes punctuation.section.embedded.begin', @@ -213,7 +215,10 @@ module.exports = [ }, { name: 'jsx Tag', - scope: ['entity.name.tag support.class.component'], + scope: [ + 'entity.name.tag support.class.component', + 'text.html.vue-html support.class.component.html' + ], settings: { fontStyle: 'normal', foreground: '#ff5370' diff --git a/src/html.js b/src/html.js index 930be76..8120bac 100644 --- a/src/html.js +++ b/src/html.js @@ -2,24 +2,34 @@ const vars = require('./var') module.exports = [ { - name: 'HTML Attributes', + name: 'HTML Attributes, directive', scope: [ 'text.html.basic entity.other.attribute-name.html', 'text.html.basic entity.other.attribute-name', 'text.xhtml.basic entity.other.attribute-name.xhtml', - 'text.xhtml.basic entity.other.attribute-name' + 'text.xhtml.basic entity.other.attribute-name', + 'text.html.derivative meta.attribute.unrecognized entity.other.attribute-name.html', + 'text.html.vue-html meta.directive.vue entity.other.attribute-name.html' ], settings: { - fontStyle: 'italic', foreground: vars.yellow1 } }, { - name: 'CSS Class & ID', + name: 'link, a, img, script => path', scope: [ - 'entity.other.attribute-name.class', - 'entity.other.attribute-name.id.css' + 'meta.tag.metadata.script.start.html meta.attribute.src string.quoted.double', + 'meta.tag.inline.a.start.html meta.attribute.href string.quoted.double', + 'meta.tag.metadata.link.void.html meta.attribute.href string.quoted.double', + 'meta.tag.object.img.void.html meta.attribute.src string.quoted.double' ], + settings: { + foreground: vars.common + } + }, + { + name: 'CSS Class & ID', + scope: ['entity.other.attribute-name.class', 'entity.other.attribute-name.id.css'], settings: { foreground: vars.yellow1 } @@ -55,19 +65,12 @@ module.exports = [ foreground: '#53c659' } }, + { - name: 'directive', + name: "directive's value, spec value", scope: [ - 'text.html.derivative meta.attribute.unrecognized entity.other.attribute-name.html' - ], - settings: { - foreground: vars.yellow1 - } - }, - { - name: "directive's value", - scope: [ - 'text.html.derivative meta.attribute.unrecognized string.quoted.double.html' + 'text.html.derivative meta.attribute.unrecognized string.quoted.double.html', + 'meta.tag.metadata.script.start.html meta.attribute.type.html string.quoted.double' ], settings: { foreground: vars.magenta1 diff --git a/themes/color-theme.json b/themes/color-theme.json index 58e113f..2853a1e 100644 --- a/themes/color-theme.json +++ b/themes/color-theme.json @@ -432,13 +432,19 @@ } }, { - "name": "HTML Attributes", - "scope": "text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.xhtml.basic entity.other.attribute-name.xhtml, text.xhtml.basic entity.other.attribute-name", + "name": "HTML Attributes, directive", + "scope": "text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.xhtml.basic entity.other.attribute-name.xhtml, text.xhtml.basic entity.other.attribute-name, text.html.derivative meta.attribute.unrecognized entity.other.attribute-name.html, text.html.vue-html meta.directive.vue entity.other.attribute-name.html", "settings": { - "fontStyle": "italic", "foreground": "#ffb62c" } }, + { + "name": "link, a, img, script => path", + "scope": "meta.tag.metadata.script.start.html meta.attribute.src string.quoted.double, meta.tag.inline.a.start.html meta.attribute.href string.quoted.double, meta.tag.metadata.link.void.html meta.attribute.href string.quoted.double, meta.tag.object.img.void.html meta.attribute.src string.quoted.double", + "settings": { + "foreground": "#90a4ae" + } + }, { "name": "CSS Class & ID", "scope": "entity.other.attribute-name.class, entity.other.attribute-name.id.css", @@ -469,15 +475,8 @@ } }, { - "name": "directive", - "scope": "text.html.derivative meta.attribute.unrecognized entity.other.attribute-name.html", - "settings": { - "foreground": "#ffb62c" - } - }, - { - "name": "directive's value", - "scope": "text.html.derivative meta.attribute.unrecognized string.quoted.double.html", + "name": "directive's value, spec value", + "scope": "text.html.derivative meta.attribute.unrecognized string.quoted.double.html, meta.tag.metadata.script.start.html meta.attribute.type.html string.quoted.double", "settings": { "foreground": "#be7ee7" } @@ -575,7 +574,7 @@ }, { "name": "Punctuation", - "scope": "meta.object.member meta.array.literal meta.brace.square, meta.object.member meta.arrow meta.brace.round, string.template meta.template.expression meta.array.literal meta.brace.square, string.template meta.template.expression meta.brace.round, meta.tag.attributes punctuation.section.embedded.begin, meta.tag.attributes punctuation.section.embedded.end, meta.tag.without-attributes punctuation.section.embedded.begin, meta.tag.without-attributes punctuation.section.embedded.end, meta.type.annotation meta.brace.square", + "scope": "meta.object.member meta.array.literal meta.brace.square, meta.object.member meta.arrow meta.brace.round, text.html.vue-html meta.brace.round, text.html.vue-html meta.directive.vue, string.template meta.template.expression meta.array.literal meta.brace.square, string.template meta.template.expression meta.brace.round, meta.tag.attributes punctuation.section.embedded.begin, meta.tag.attributes punctuation.section.embedded.end, meta.tag.without-attributes punctuation.section.embedded.begin, meta.tag.without-attributes punctuation.section.embedded.end, meta.type.annotation meta.brace.square", "settings": { "foreground": "#90a4ae" } @@ -628,7 +627,7 @@ }, { "name": "jsx Tag", - "scope": "entity.name.tag support.class.component", + "scope": "entity.name.tag support.class.component, text.html.vue-html support.class.component.html", "settings": { "fontStyle": "normal", "foreground": "#ff5370"