-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
259 lines (259 loc) · 11.2 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
{
"name": "vscode-file-header",
"displayName": "👊 Power Header 💥",
"description": "Automatically (or via command or shortcut) insert (and update) file header text (author comment). Easy configuration and powerful customization to fit any needs!",
"publisher": "epivision",
"version": "1.0.8",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://github.com/EPIVISION/vscode-file-header",
"repository": {
"type": "git",
"url": "https://github.com/EPIVISION/vscode-file-header"
},
"bugs": {
"url": "https://github.com/EPIVISION/vscode-file-header/issues"
},
"qna": "https://github.com/EPIVISION/vscode-file-header/wiki",
"icon": "icon.png",
"galleryBanner": {
"color": "#f0eeec",
"theme": "light"
},
"badges": [
{
"url": "https://badgen.net/github/stars/EPIVISION/vscode-file-header?icon=github",
"href": "https://github.com/EPIVISION/vscode-file-header/stargazers",
"description": "stars"
},
{
"url": "https://badgen.net/github/open-issues/EPIVISION/vscode-file-header?icon=github",
"href": "https://github.com/EPIVISION/vscode-file-header/issues",
"description": "open issues"
},
{
"url": "https://badgen.net/github/last-commit/EPIVISION/vscode-file-header?icon=github",
"href": "https://github.com/EPIVISION/vscode-file-header/commits/master",
"description": "last commit"
}
],
"engines": {
"vscode": "^1.43.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Other"
],
"keywords": [
"header",
"license",
"copyright",
"author",
"info",
"powerful",
"power",
"file header",
"file info",
"file author",
"author info",
"author comment",
"comment",
"auto",
"automatically",
"easy",
"custom",
"customize",
"multiroot",
"multi-root ready",
"epivision"
],
"activationEvents": [
"*",
"onCommand:powerHeader.insert"
],
"main": "extension.js",
"contributes": {
"configuration": [
{
"title": "👊 Power Header 💥",
"properties": {
"powerHeader.😉": {
"type": "boolean",
"default": false,
"scope": "application",
"markdownDescription": "(this is not a setting) \n\n☝️ **Remember, remember,** you can always overwrite all settings in a *settings.json*, even language specific: `\"[<language>]\": { \"powerHeader.<setting>\": ... }`, to achieve your desired header style 👍 \n\nThe effective setting is computed by overriding or merging the values in the following order: \n\n1. `default················Value` \n\n1. `global·················Value` (if defined ➡️ *User settings.json*) \n\n1. `workspace··············Value` (if defined ➡️ *Workspace settings.json*) \n\n1. `workspaceFolder········Value` (if defined ➡️ *.vscode/settings.json*) \n\n1. `global·········LanguageValue` (if defined ➡️ *User settings.json \"[<language>]\": ...*) \n\n1. `workspace······LanguageValue` (if defined ➡️ *Workspace settings.json \"[<language>]\": ...*) \n\n1. `workspaceFolderLanguageValue` (if defined ➡️ *.vscode/settings.json \"[<language>]\": ...*)"
},
"powerHeader.autoInsert.enable": {
"type": "boolean",
"default": false,
"scope": "language-overridable",
"markdownDescription": "⏩ Automatically insert header from **Template** into new files."
},
"powerHeader.autoInsert.allow": {
"type": "string",
"enum": [
"all",
"none",
"always"
],
"markdownEnumDescriptions": [
"☑️ All languages, except in **Languages**.",
"🚫 No language, unless in **Languages**.",
"✅ Use this option as a language specific **Allow** overwrite in *settings.json*: \n\n`\"[<language>]\": { \"powerHeader.autoInsert.allow\" \"always\", ... }`"
],
"default": "all",
"scope": "language-overridable",
"markdownDescription": "🛑 For which *language identifiers* automatic header insert is allowed by default."
},
"powerHeader.autoInsert.languages": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"plaintext",
"Log"
],
"scope": "language-overridable",
"markdownDescription": "🗃️ List of *language identifiers* for **Allow** negation. \n\n- If **Allow** is `all` works as a blacklist (exclude these languages) \n\n- If **Allow** is `none` works as a whitelist (auto insert only for these languages) \n\n- If **Allow** is `always` has no effect at all \n\n\r☝️ List of [known language identifiers](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers)"
},
"powerHeader.commentMode": {
"type": "string",
"enum": [
"block",
"line",
"raw"
],
"markdownEnumDescriptions": [
"⬛ Use Block Comment style. \n\n`/* Hello` \n\n`World */`",
"➖ Use Line Comment style. \n\n`// Hello` \n\n`// World`",
"📃 Insert header text as is. \n\n`Hello` \n\n`World` \n\nNo extra commenting is done. \n\nAttention ⚠️ \n\n🅰 Use this option as a language specific **Template** overwrite in *settings.json*, as you must use the correct comment charaters in the **Template**: \n\n`\"[<language>]\": { \"powerHeader.commentMode\" \"raw\", \"powerHeader.template\": ... }` \n\n🅱 Use the comment [vscode snippet variables](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables) in the **Template** \n\n`${BLOCK_COMMENT_START}` \n\n`${BLOCK_COMMENT_END}` \n\n`${LINE_COMMENT}`"
],
"default": "block",
"scope": "language-overridable",
"markdownDescription": "💬 How to comment header text assembled from **Template**. \n\nAttention ⚠️ \n\nNot all languages support all modes; e.g. \n\n- *js* has both (`// /* */`) \n\n- *html* or *css* only block tags (`<!-- -->` / `/* */`) \n\n- *shell* however only line tag (`REM`, `#`) \n\nYou can use language specific overwrites in *settings.json*: `\"[shellscript]\": { \"powerHeader.commentMode\": \"line\" }` in these cases."
},
"powerHeader.template": {
"type": "string",
"default": "\\nAuthor: <author> (email)\\n$TM_FILENAME (c) $CURRENT_YEAR\\nDesc: ${1:description}\\nCreated: !date!\\nModified: !date!\\n",
"scope": "language-overridable",
"markdownDescription": "📄 Header template text or URI. \n\nSee **Variables** for string interpolation options. \n\nTemplate examples: \n\n- Plain text `Author: <author>\\n(c) $CURRENT_YEAR` \n\n- File containing template text in current workspace `file://$WORKSPACE_FOLDER/template.txt` \n\n- Local file `file://C:/windows/header.txt` \n\n- Local file `file:///opt/linux/header` \n\n- Remote `https://raw.githubusercontent.com/EPIVISION/vscode-file-header/master/header.txt` \n\n☝️ To initiate URI interpolation at least one variable must contain a `$`-[sigil](https://en.wikipedia.org/wiki/Sigil_(computer_programming))."
},
"powerHeader.variables": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"<author>='Hello'",
"email=\"World\"",
"!date!=new Date().toISOString()"
],
"scope": "language-overridable",
"markdownDescription": "🔀 Variables for interpolation in **Template** and **Content**. \n\nYou can use all [vscode snippet variables](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables) and define custom variable pairs here in [INI file format](https://en.wikipedia.org/wiki/INI_file#Format) `name=value`. \n\n`value` is evaluated as JavaScript code before replace(`name`), allowing for arbitrary complex text — use 'quotes' for string values! \n\n☝️ Interpolation is done in the order of this list (lastly vscode snippet variables); e.g. `a='b'` followed by `b='c'` would be equal to `a='c'` — keep an eye out on not accidentally overwriting names from values or use this to your advantage."
},
"powerHeader.logLevel": {
"type": "string",
"enum": [
"error",
"warn",
"info",
"debug"
],
"default": "info",
"markdownEnumDescriptions": [
"💥 Serious problem",
"⚠️ Potential problem",
"ℹ Trace execution",
"🐞 Useful when debugging problem"
],
"scope": "language-overridable",
"markdownDescription": "📜 Minium log level to print in *Output Channel*."
},
"powerHeader.newLines": {
"type": "number",
"minimum": 0,
"default": 2,
"scope": "language-overridable",
"markdownDescription": "↩️ Insert additional *new lines* after header text. \n\nUse this option instead of adding `\\n` in **Template** to avoid commented out new lines."
},
"powerHeader.update.enable": {
"type": "string",
"enum": [
"disable",
"manual",
"save"
],
"default": "disable",
"markdownEnumDescriptions": [
"🚫 Completely disable update functionality, including command/shortcut.",
"🖐 Manual via command/shortcut only.",
"💾 Also on file save (this extends `manual`)"
],
"scope": "language-overridable",
"markdownDescription": "🔄 When to update the **header** contents. \n\nSee **Content** for options. \n\nUse with caution ⚠️"
},
"powerHeader.update.content": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"Modified:\\s+(.+)=!date!"
],
"scope": "language-overridable",
"markdownDescription": "(You really should use a version control system for change tracking, but here you go 🤷) \n\n📝 JavaScript regular expression replace(`RegExp`) on frist match, allowing for arbitrary complex text updates. \n\nSee **Variables** for string interpolation options. \n\n☝️ You can use `name` of **Variables** here as `value` to perfrom an indirect interplation on that variable (😉 syntactic sugar for more [dry-ness](https://en.wikipedia.org/wiki/Don't_repeat_yourself)). \n\nUse with caution ⚠️"
}
}
}
],
"commands": [
{
"command": "powerHeader.insert",
"title": "Insert / Update",
"category": "👊 Power Header 💥",
"icon": {
"light": "path/to/light/icon.svg",
"dark": "path/to/dark/icon.svg"
}
}
],
"keybindings": [
{
"command": "powerHeader.insert",
"key": "ctrl+alt+h",
"mac": "cmd+alt+h",
"when": "editorTextFocus"
}
]
},
"scripts": {
"vscode:prepublish": "webpack --mode production",
"compile": "tsc -p ./",
"lint": "eslint src --ext ts",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"test": "node ./out/test/runTest.js",
"webpack": "webpack --mode production",
"webpack-dev": "webpack --mode development"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^7.0.1",
"@types/node": "^12.11.7",
"@types/vscode": "^1.43.0",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"copy-webpack-plugin": "^5.1.1",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"glob": "^7.1.6",
"mocha": "^7.0.1",
"ts-loader": "^6.2.2",
"typescript": "^3.7.5",
"vscode-test": "^1.3.0",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11"
}
}