generator-code 1.6.7 → 1.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/app/dependencyVersions/package.json +34 -0
- package/generators/app/env.js +2 -2
- package/generators/app/generate-colortheme.js +22 -21
- package/generators/app/index.js +3 -3
- package/generators/app/templates/ext-colortheme/themes/{new-hc-color-theme.json → new-hc-black-color-theme.json} +1 -2
- package/generators/app/templates/ext-colortheme/themes/{new-light-color-theme.json → new-hc-light-color-theme.json} +0 -1
- package/generators/app/templates/ext-colortheme/themes/new-vs-color-theme.json +413 -0
- package/generators/app/templates/ext-colortheme/themes/{new-dark-color-theme.json → new-vs-dark-color-theme.json} +0 -1
- package/generators/app/templates/ext-command-web/tsconfig.json +2 -2
- package/generators/app/templates/ext-localization/vsc-extension-quickstart.md +1 -1
- package/generators/app/templates/ext-snippets/vsc-extension-quickstart.md +1 -1
- package/package.json +6 -6
- package/generators/app/package.json +0 -34
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "generator-code-dependencies-versions",
|
|
3
|
+
"description": "Helper file to manage the versions of the node modules used by the generators. Named package.json so the VS Code dependencies completions work. Must be in a subfolder due to #325",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"private": true,
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@types/glob": "^7.2.0",
|
|
8
|
+
"@types/mocha": "^9.1.1",
|
|
9
|
+
"@types/node": "14.x",
|
|
10
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
11
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
12
|
+
"eslint": "^8.14.0",
|
|
13
|
+
"glob": "^8.0.1",
|
|
14
|
+
"mocha": "^9.2.2",
|
|
15
|
+
"typescript": "^4.6.4",
|
|
16
|
+
"@vscode/test-electron": "^2.1.3",
|
|
17
|
+
"@vscode/test-web": "^0.0.24",
|
|
18
|
+
"@types/webpack-env": "^1.16.4",
|
|
19
|
+
"@types/vscode-notebook-renderer": "^1.60.0",
|
|
20
|
+
"concurrently": "^5.3.0",
|
|
21
|
+
"css-loader": "^4.2.0",
|
|
22
|
+
"fork-ts-checker-webpack-plugin": "^5.0.14",
|
|
23
|
+
"style-loader": "^1.2.1",
|
|
24
|
+
"ts-loader": "^9.2.8",
|
|
25
|
+
"vscode-dts": "^0.3.3",
|
|
26
|
+
"vscode-notebook-error-overlay": "^1.0.1",
|
|
27
|
+
"webpack": "^5.70.0",
|
|
28
|
+
"util": "^0.12.4",
|
|
29
|
+
"webpack-cli": "^4.9.2",
|
|
30
|
+
"webpack-dev-server": "^3.11.2",
|
|
31
|
+
"assert": "^2.0.0",
|
|
32
|
+
"process": "^0.11.10"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/generators/app/env.js
CHANGED
|
@@ -41,7 +41,7 @@ module.exports.getLatestVSCodeVersion = getLatestVSCodeVersion;
|
|
|
41
41
|
|
|
42
42
|
module.exports.getDependencyVersions = async function () {
|
|
43
43
|
const vscodeVersion = await getLatestVSCodeVersion();
|
|
44
|
-
const versions = JSON.parse((await fs.promises.readFile(path.join(__dirname, 'package.json'))).toString()).dependencies;
|
|
44
|
+
const versions = JSON.parse((await fs.promises.readFile(path.join(__dirname, 'dependencyVersions', 'package.json'))).toString()).dependencies;
|
|
45
45
|
versions["@types/vscode"] = vscodeVersion
|
|
46
46
|
return versions;
|
|
47
|
-
}
|
|
47
|
+
}
|
|
@@ -48,8 +48,12 @@ module.exports = {
|
|
|
48
48
|
value: "vs"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
name: "High Contrast",
|
|
51
|
+
name: "High Contrast Dark",
|
|
52
52
|
value: "hc-black"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "High Contrast Light",
|
|
56
|
+
value: "hc-light"
|
|
53
57
|
}
|
|
54
58
|
]
|
|
55
59
|
});
|
|
@@ -71,13 +75,7 @@ module.exports = {
|
|
|
71
75
|
extensionConfig.themeContent.name = extensionConfig.themeName;
|
|
72
76
|
generator.fs.copyTpl(generator.templatePath('themes/color-theme.json'), generator.destinationPath('themes', extensionConfig.themeFileName), extensionConfig);
|
|
73
77
|
} else {
|
|
74
|
-
|
|
75
|
-
generator.fs.copyTpl(generator.templatePath('themes/new-light-color-theme.json'), generator.destinationPath('themes', extensionConfig.themeFileName), extensionConfig);
|
|
76
|
-
} else if (extensionConfig.themeBase === 'hc') {
|
|
77
|
-
generator.fs.copyTpl(generator.templatePath('themes/new-hc-color-theme.json'), generator.destinationPath('themes', extensionConfig.themeFileName), extensionConfig);
|
|
78
|
-
} else {
|
|
79
|
-
generator.fs.copyTpl(generator.templatePath('themes/new-dark-color-theme.json'), generator.destinationPath('themes', extensionConfig.themeFileName), extensionConfig);
|
|
80
|
-
}
|
|
78
|
+
generator.fs.copyTpl(generator.templatePath('themes/new-' + extensionConfig.themeBase + '-color-theme.json'), generator.destinationPath('themes', extensionConfig.themeFileName), extensionConfig);
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
generator.fs.copy(generator.templatePath('vscode'), generator.destinationPath('.vscode'));
|
|
@@ -144,17 +142,20 @@ function convertTheme(location, extensionConfig, inline, generator) {
|
|
|
144
142
|
// load from url
|
|
145
143
|
return request.xhr({ url: location }).then(r => {
|
|
146
144
|
if (r.status == 200) {
|
|
147
|
-
|
|
145
|
+
let tmThemeFileName = null;
|
|
148
146
|
if (!inline) {
|
|
149
|
-
|
|
150
|
-
if (contentDisposition) {
|
|
151
|
-
|
|
147
|
+
let contentDisposition = r.headers && r.headers['content-disposition'];
|
|
148
|
+
if (Array.isArray(contentDisposition)) {
|
|
149
|
+
contentDisposition = contentDisposition[0];
|
|
150
|
+
}
|
|
151
|
+
if (typeof contentDisposition === 'string') {
|
|
152
|
+
const fileNameMatch = contentDisposition.match(/filename="([^"]*)/);
|
|
152
153
|
if (fileNameMatch) {
|
|
153
154
|
tmThemeFileName = fileNameMatch[1];
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
157
|
if (!tmThemeFileName) {
|
|
157
|
-
|
|
158
|
+
const lastSlash = location.lastIndexOf('/');
|
|
158
159
|
if (lastSlash) {
|
|
159
160
|
tmThemeFileName = location.substr(lastSlash + 1);
|
|
160
161
|
} else {
|
|
@@ -169,14 +170,14 @@ function convertTheme(location, extensionConfig, inline, generator) {
|
|
|
169
170
|
});
|
|
170
171
|
} else {
|
|
171
172
|
// load from disk
|
|
172
|
-
|
|
173
|
+
let body = null;
|
|
173
174
|
try {
|
|
174
175
|
body = fs.readFileSync(location);
|
|
175
176
|
} catch (error) {
|
|
176
177
|
return Promise.reject("Problems loading theme: " + error.message);
|
|
177
178
|
}
|
|
178
179
|
if (body) {
|
|
179
|
-
|
|
180
|
+
let fileName = null;
|
|
180
181
|
if (!inline) {
|
|
181
182
|
fileName = path.basename(location);
|
|
182
183
|
}
|
|
@@ -188,8 +189,8 @@ function convertTheme(location, extensionConfig, inline, generator) {
|
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
function processContent(extensionConfig, tmThemeFileName, body, generator) {
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
const themeNameMatch = body.match(/<key>name<\/key>\s*<string>([^<]*)/);
|
|
193
|
+
const themeName = themeNameMatch ? themeNameMatch[1] : '';
|
|
193
194
|
try {
|
|
194
195
|
extensionConfig.themeContent = migrate(body, tmThemeFileName, generator);
|
|
195
196
|
if (tmThemeFileName) {
|
|
@@ -209,7 +210,7 @@ function processContent(extensionConfig, tmThemeFileName, body, generator) {
|
|
|
209
210
|
};
|
|
210
211
|
|
|
211
212
|
// mapping from old tmTheme setting to new workbench color ids
|
|
212
|
-
|
|
213
|
+
const mappings = {
|
|
213
214
|
"background": ["editor.background"],
|
|
214
215
|
"foreground": ["editor.foreground"],
|
|
215
216
|
"hoverHighlight": ["editor.hoverHighlightBackground"],
|
|
@@ -237,7 +238,7 @@ var mappings = {
|
|
|
237
238
|
|
|
238
239
|
function migrate(content, tmThemeFileName, generator) {
|
|
239
240
|
let result = {};
|
|
240
|
-
|
|
241
|
+
let theme;
|
|
241
242
|
try {
|
|
242
243
|
theme = plistParser.parse(content);
|
|
243
244
|
} catch (e) {
|
|
@@ -254,7 +255,7 @@ function migrate(content, tmThemeFileName, generator) {
|
|
|
254
255
|
entry.scope = parts;
|
|
255
256
|
}
|
|
256
257
|
} else {
|
|
257
|
-
|
|
258
|
+
const entrySettings = entry.settings;
|
|
258
259
|
let notSupported = [];
|
|
259
260
|
for (let entry in entrySettings) {
|
|
260
261
|
let mapping = mappings[entry];
|
|
@@ -282,4 +283,4 @@ function migrate(content, tmThemeFileName, generator) {
|
|
|
282
283
|
result.colors = colorMap;
|
|
283
284
|
}
|
|
284
285
|
return result;
|
|
285
|
-
};
|
|
286
|
+
};
|
package/generators/app/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const yosay = require('yosay');
|
|
|
8
8
|
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const env = require('./env');
|
|
11
|
-
const
|
|
11
|
+
const which = require('which');
|
|
12
12
|
|
|
13
13
|
const colortheme = require('./generate-colortheme');
|
|
14
14
|
const commandjs = require('./generate-command-js');
|
|
@@ -185,7 +185,7 @@ module.exports = class extends Generator {
|
|
|
185
185
|
|
|
186
186
|
// Git init
|
|
187
187
|
if (this.extensionConfig.gitInit) {
|
|
188
|
-
this.spawnCommand('git', ['init', '--quiet']);
|
|
188
|
+
this.spawnCommand('git', ['init', '--quiet', '--initial-branch=main']);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
if (this.extensionConfig.proposedAPI) {
|
|
@@ -196,7 +196,7 @@ module.exports = class extends Generator {
|
|
|
196
196
|
this.log('Your extension ' + this.extensionConfig.name + ' has been created!');
|
|
197
197
|
this.log('');
|
|
198
198
|
|
|
199
|
-
const [codeStableLocation, codeInsidersLocation] = await Promise.all([
|
|
199
|
+
const [codeStableLocation, codeInsidersLocation] = await Promise.all([which('code').catch(() => undefined), which('code-insiders').catch(() => undefined)]);
|
|
200
200
|
|
|
201
201
|
if (!this.extensionConfig.insiders && !this.options['open'] && !this.options['openInInsiders'] && !this.options['quick']) {
|
|
202
202
|
const cdLocation = this.options['destination'] || this.extensionConfig.name;
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": <%-JSON.stringify(themeName)%>,
|
|
3
|
+
"colors": {
|
|
4
|
+
"editor.background": "#f5f5f5",
|
|
5
|
+
"editor.foreground": "#333333",
|
|
6
|
+
"list.activeSelectionIconForeground": "#fff"
|
|
7
|
+
},
|
|
8
|
+
"tokenColors": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Comments",
|
|
11
|
+
"scope": [
|
|
12
|
+
"comment",
|
|
13
|
+
"punctuation.definition.comment"
|
|
14
|
+
],
|
|
15
|
+
"settings": {
|
|
16
|
+
"fontStyle": "italic",
|
|
17
|
+
"foreground": "#AAAAAA"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Comments: Preprocessor",
|
|
22
|
+
"scope": "comment.block.preprocessor",
|
|
23
|
+
"settings": {
|
|
24
|
+
"fontStyle": "",
|
|
25
|
+
"foreground": "#AAAAAA"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Comments: Documentation",
|
|
30
|
+
"scope": [
|
|
31
|
+
"comment.documentation",
|
|
32
|
+
"comment.block.documentation"
|
|
33
|
+
],
|
|
34
|
+
"settings": {
|
|
35
|
+
"foreground": "#448C27"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Invalid - Illegal",
|
|
40
|
+
"scope": "invalid.illegal",
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#660000"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "Operators",
|
|
47
|
+
"scope": "keyword.operator",
|
|
48
|
+
"settings": {
|
|
49
|
+
"foreground": "#777777"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "Keywords",
|
|
54
|
+
"scope": [
|
|
55
|
+
"keyword",
|
|
56
|
+
"storage"
|
|
57
|
+
],
|
|
58
|
+
"settings": {
|
|
59
|
+
"foreground": "#4B83CD"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "Types",
|
|
64
|
+
"scope": [
|
|
65
|
+
"storage.type",
|
|
66
|
+
"support.type"
|
|
67
|
+
],
|
|
68
|
+
"settings": {
|
|
69
|
+
"foreground": "#7A3E9D"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Language Constants",
|
|
74
|
+
"scope": [
|
|
75
|
+
"constant.language",
|
|
76
|
+
"support.constant",
|
|
77
|
+
"variable.language"
|
|
78
|
+
],
|
|
79
|
+
"settings": {
|
|
80
|
+
"foreground": "#AB6526"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "Variables",
|
|
85
|
+
"scope": [
|
|
86
|
+
"variable",
|
|
87
|
+
"support.variable"
|
|
88
|
+
],
|
|
89
|
+
"settings": {
|
|
90
|
+
"foreground": "#7A3E9D"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "Functions",
|
|
95
|
+
"scope": [
|
|
96
|
+
"entity.name.function",
|
|
97
|
+
"support.function"
|
|
98
|
+
],
|
|
99
|
+
"settings": {
|
|
100
|
+
"fontStyle": "bold",
|
|
101
|
+
"foreground": "#AA3731"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "Classes",
|
|
106
|
+
"scope": [
|
|
107
|
+
"entity.name.type",
|
|
108
|
+
"entity.other.inherited-class",
|
|
109
|
+
"support.class"
|
|
110
|
+
],
|
|
111
|
+
"settings": {
|
|
112
|
+
"fontStyle": "bold",
|
|
113
|
+
"foreground": "#7A3E9D"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "Exceptions",
|
|
118
|
+
"scope": "entity.name.exception",
|
|
119
|
+
"settings": {
|
|
120
|
+
"foreground": "#660000"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "Sections",
|
|
125
|
+
"scope": "entity.name.section",
|
|
126
|
+
"settings": {
|
|
127
|
+
"fontStyle": "bold"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "Numbers, Characters",
|
|
132
|
+
"scope": [
|
|
133
|
+
"constant.numeric",
|
|
134
|
+
"constant.character",
|
|
135
|
+
"constant"
|
|
136
|
+
],
|
|
137
|
+
"settings": {
|
|
138
|
+
"foreground": "#AB6526"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "Strings",
|
|
143
|
+
"scope": "string",
|
|
144
|
+
"settings": {
|
|
145
|
+
"foreground": "#448C27"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "Strings: Escape Sequences",
|
|
150
|
+
"scope": "constant.character.escape",
|
|
151
|
+
"settings": {
|
|
152
|
+
"foreground": "#777777"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "Strings: Regular Expressions",
|
|
157
|
+
"scope": "string.regexp",
|
|
158
|
+
"settings": {
|
|
159
|
+
"foreground": "#4B83CD"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "Strings: Symbols",
|
|
164
|
+
"scope": "constant.other.symbol",
|
|
165
|
+
"settings": {
|
|
166
|
+
"foreground": "#AB6526"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "Punctuation",
|
|
171
|
+
"scope": "punctuation",
|
|
172
|
+
"settings": {
|
|
173
|
+
"foreground": "#777777"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "HTML: Doctype Declaration",
|
|
178
|
+
"scope": [
|
|
179
|
+
"meta.tag.sgml.doctype",
|
|
180
|
+
"meta.tag.sgml.doctype string",
|
|
181
|
+
"meta.tag.sgml.doctype entity.name.tag",
|
|
182
|
+
"meta.tag.sgml punctuation.definition.tag.html"
|
|
183
|
+
],
|
|
184
|
+
"settings": {
|
|
185
|
+
"foreground": "#AAAAAA"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "HTML: Tags",
|
|
190
|
+
"scope": [
|
|
191
|
+
"meta.tag",
|
|
192
|
+
"punctuation.definition.tag.html",
|
|
193
|
+
"punctuation.definition.tag.begin.html",
|
|
194
|
+
"punctuation.definition.tag.end.html"
|
|
195
|
+
],
|
|
196
|
+
"settings": {
|
|
197
|
+
"foreground": "#91B3E0"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "HTML: Tag Names",
|
|
202
|
+
"scope": "entity.name.tag",
|
|
203
|
+
"settings": {
|
|
204
|
+
"foreground": "#4B83CD"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "HTML: Attribute Names",
|
|
209
|
+
"scope": [
|
|
210
|
+
"meta.tag entity.other.attribute-name",
|
|
211
|
+
"entity.other.attribute-name.html"
|
|
212
|
+
],
|
|
213
|
+
"settings": {
|
|
214
|
+
"fontStyle": "italic",
|
|
215
|
+
"foreground": "#91B3E0"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "HTML: Entities",
|
|
220
|
+
"scope": [
|
|
221
|
+
"constant.character.entity",
|
|
222
|
+
"punctuation.definition.entity"
|
|
223
|
+
],
|
|
224
|
+
"settings": {
|
|
225
|
+
"foreground": "#AB6526"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "CSS: Selectors",
|
|
230
|
+
"scope": [
|
|
231
|
+
"meta.selector",
|
|
232
|
+
"meta.selector entity",
|
|
233
|
+
"meta.selector entity punctuation",
|
|
234
|
+
"entity.name.tag.css"
|
|
235
|
+
],
|
|
236
|
+
"settings": {
|
|
237
|
+
"foreground": "#7A3E9D"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "CSS: Property Names",
|
|
242
|
+
"scope": [
|
|
243
|
+
"meta.property-name",
|
|
244
|
+
"support.type.property-name"
|
|
245
|
+
],
|
|
246
|
+
"settings": {
|
|
247
|
+
"foreground": "#AB6526"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "CSS: Property Values",
|
|
252
|
+
"scope": [
|
|
253
|
+
"meta.property-value",
|
|
254
|
+
"meta.property-value constant.other",
|
|
255
|
+
"support.constant.property-value"
|
|
256
|
+
],
|
|
257
|
+
"settings": {
|
|
258
|
+
"foreground": "#448C27"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "CSS: Important Keyword",
|
|
263
|
+
"scope": "keyword.other.important",
|
|
264
|
+
"settings": {
|
|
265
|
+
"fontStyle": "bold"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "Markup: Changed",
|
|
270
|
+
"scope": "markup.changed",
|
|
271
|
+
"settings": {
|
|
272
|
+
"foreground": "#000000"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "Markup: Deletion",
|
|
277
|
+
"scope": "markup.deleted",
|
|
278
|
+
"settings": {
|
|
279
|
+
"foreground": "#000000"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "Markup: Emphasis",
|
|
284
|
+
"scope": "markup.italic",
|
|
285
|
+
"settings": {
|
|
286
|
+
"fontStyle": "italic"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "Markup: Error",
|
|
291
|
+
"scope": "markup.error",
|
|
292
|
+
"settings": {
|
|
293
|
+
"foreground": "#660000"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "Markup: Insertion",
|
|
298
|
+
"scope": "markup.inserted",
|
|
299
|
+
"settings": {
|
|
300
|
+
"foreground": "#000000"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "Markup: Link",
|
|
305
|
+
"scope": "meta.link",
|
|
306
|
+
"settings": {
|
|
307
|
+
"foreground": "#4B83CD"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "Markup: Output",
|
|
312
|
+
"scope": [
|
|
313
|
+
"markup.output",
|
|
314
|
+
"markup.raw"
|
|
315
|
+
],
|
|
316
|
+
"settings": {
|
|
317
|
+
"foreground": "#777777"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "Markup: Prompt",
|
|
322
|
+
"scope": "markup.prompt",
|
|
323
|
+
"settings": {
|
|
324
|
+
"foreground": "#777777"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "Markup: Heading",
|
|
329
|
+
"scope": "markup.heading",
|
|
330
|
+
"settings": {
|
|
331
|
+
"foreground": "#AA3731"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "Markup: Strong",
|
|
336
|
+
"scope": "markup.bold",
|
|
337
|
+
"settings": {
|
|
338
|
+
"fontStyle": "bold"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "Markup: Traceback",
|
|
343
|
+
"scope": "markup.traceback",
|
|
344
|
+
"settings": {
|
|
345
|
+
"foreground": "#660000"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"name": "Markup: Underline",
|
|
350
|
+
"scope": "markup.underline",
|
|
351
|
+
"settings": {
|
|
352
|
+
"fontStyle": "underline"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "Markup Quote",
|
|
357
|
+
"scope": "markup.quote",
|
|
358
|
+
"settings": {
|
|
359
|
+
"foreground": "#7A3E9D"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "Markup Lists",
|
|
364
|
+
"scope": "markup.list",
|
|
365
|
+
"settings": {
|
|
366
|
+
"foreground": "#4B83CD"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "Markup Styling",
|
|
371
|
+
"scope": [
|
|
372
|
+
"markup.bold",
|
|
373
|
+
"markup.italic"
|
|
374
|
+
],
|
|
375
|
+
"settings": {
|
|
376
|
+
"foreground": "#448C27"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "Markup Inline",
|
|
381
|
+
"scope": "markup.inline.raw",
|
|
382
|
+
"settings": {
|
|
383
|
+
"fontStyle": "",
|
|
384
|
+
"foreground": "#AB6526"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "Extra: Diff Range",
|
|
389
|
+
"scope": [
|
|
390
|
+
"meta.diff.range",
|
|
391
|
+
"meta.diff.index",
|
|
392
|
+
"meta.separator"
|
|
393
|
+
],
|
|
394
|
+
"settings": {
|
|
395
|
+
"foreground": "#434343"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "Extra: Diff From",
|
|
400
|
+
"scope": "meta.diff.header.from-file",
|
|
401
|
+
"settings": {
|
|
402
|
+
"foreground": "#434343"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "Extra: Diff To",
|
|
407
|
+
"scope": "meta.diff.header.to-file",
|
|
408
|
+
"settings": {
|
|
409
|
+
"foreground": "#434343"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
}
|
|
@@ -20,7 +20,7 @@ To create/update the `translations` folder with the latest strings from transife
|
|
|
20
20
|
|
|
21
21
|
* Get an API token from https://www.transifex.com/user/settings/api. The token needs to have access to the `vscode-editor`, `vscode-workbench` and `vscode-extensions` projects.
|
|
22
22
|
* Set the API token to the environment variable `TRANSIFEX_API_TOKEN`.
|
|
23
|
-
* Check out the `
|
|
23
|
+
* Check out the `main` branch of the [VS Code repository](https://github.com/Microsoft/vscode).
|
|
24
24
|
* Preferably, place the VSCode repo next to the language pack extension (so both have the same parent folder).
|
|
25
25
|
* `cd vscode` and run `yarn` to initialize the VS Code repo. More information on how to build VS Code you can find [here](https://github.com/Microsoft/vscode/wiki/How-to-Contribute).
|
|
26
26
|
* If the language pack extension is placed next to the VS Code repository: `npm run update-localization-extension <%- lpLanguageId %>`
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
* This folder contains all of the files necessary for your extension.
|
|
6
6
|
* `package.json` - this is the manifest file that defines the location of the snippet file and specifies the language of the snippets.
|
|
7
|
-
* `snippets/snippets.
|
|
7
|
+
* `snippets/snippets.code-snippets` - the file containing all snippets.
|
|
8
8
|
|
|
9
9
|
## Get up and running straight away
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-code",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"description": "Yeoman generator for Visual Studio Code Extensions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yeoman-generator",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"chalk": "^4.1.2",
|
|
38
38
|
"fast-plist": "^0.1.2",
|
|
39
|
-
"request-light": "^0.5.
|
|
39
|
+
"request-light": "^0.5.8",
|
|
40
40
|
"sanitize-filename": "^1.6.3",
|
|
41
41
|
"which": "^2.0.2",
|
|
42
42
|
"yeoman-generator": "^5.6.1",
|
|
43
43
|
"yosay": "^2.0.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/mocha": "^9.1.
|
|
46
|
+
"@types/mocha": "^9.1.1",
|
|
47
47
|
"@types/node": "^16.11.6",
|
|
48
|
-
"@types/yeoman-generator": "^5.2.
|
|
48
|
+
"@types/yeoman-generator": "^5.2.10",
|
|
49
49
|
"@types/yeoman-test": "^4.0.3",
|
|
50
|
-
"mocha": "^9.2.
|
|
50
|
+
"mocha": "^9.2.2",
|
|
51
51
|
"yeoman-environment": "^3.9.1",
|
|
52
|
-
"yeoman-test": "^6.
|
|
52
|
+
"yeoman-test": "^6.3.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "yo-code-dependencies-versions",
|
|
3
|
-
"description": "Helper file to manage the versions of the node modules used by the generators.",
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"private": true,
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"@types/glob": "^7.2.0",
|
|
8
|
-
"@types/mocha": "^9.0.0",
|
|
9
|
-
"@types/node": "14.x",
|
|
10
|
-
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
11
|
-
"@typescript-eslint/parser": "^5.9.1",
|
|
12
|
-
"eslint": "^8.6.0",
|
|
13
|
-
"glob": "^7.2.0",
|
|
14
|
-
"mocha": "^9.1.3",
|
|
15
|
-
"typescript": "^4.5.4",
|
|
16
|
-
"@vscode/test-electron": "^2.0.3",
|
|
17
|
-
"@vscode/test-web": "^0.0.15",
|
|
18
|
-
"@types/webpack-env": "^1.16.3",
|
|
19
|
-
"@types/vscode-notebook-renderer": "^1.57.8",
|
|
20
|
-
"concurrently": "^5.3.0",
|
|
21
|
-
"css-loader": "^4.2.0",
|
|
22
|
-
"fork-ts-checker-webpack-plugin": "^5.0.14",
|
|
23
|
-
"style-loader": "^1.2.1",
|
|
24
|
-
"ts-loader": "^9.2.6",
|
|
25
|
-
"vscode-dts": "^0.3.3",
|
|
26
|
-
"vscode-notebook-error-overlay": "^1.0.1",
|
|
27
|
-
"webpack": "^5.66.0",
|
|
28
|
-
"util": "^0.12.4",
|
|
29
|
-
"webpack-cli": "^4.9.1",
|
|
30
|
-
"webpack-dev-server": "^3.11.2",
|
|
31
|
-
"assert": "^2.0.0",
|
|
32
|
-
"process": "^0.11.10"
|
|
33
|
-
}
|
|
34
|
-
}
|