-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpackage.json
234 lines (234 loc) · 9.96 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
{
"name": "binary-file-viewer",
"displayName": "Binary File Viewer",
"description": "A viewer for binary files. The viewer can be customized to parse the contents of any binary file.",
"version": "1.12.0",
"publisher": "maziac",
"author": {
"name": "Thomas Busse"
},
"license": "MIT",
"keywords": [
"binary",
"viewer",
"customizable"
],
"repository": {
"type": "git",
"url": "https://github.com/maziac/binary-file-viewer"
},
"sponsor": {
"url": "https://github.com/sponsors/maziac"
},
"engines": {
"vscode": ">=1.75.0"
},
"icon": "assets/local/icon.png",
"categories": [
"Visualization"
],
"activationEvents": [
"onLanguage:javascript"
],
"capabilities": {
"untrustedWorkspaces": {
"supported": true
}
},
"main": "./out/extension",
"contributes": {
"customEditors": [
{
"viewType": "binary-file-viewer.viewer",
"displayName": "Binary File Viewer",
"selector": [
{
"filenamePattern": "*.*"
}
],
"priority": "option"
}
],
"configuration": {
"type": "object",
"title": "binary-file-viewer configuration",
"properties": {
"binary-file-viewer.parserFolders": {
"scope": "window",
"type": "array",
"default": [],
"markdownDescription": "Add here the path(s) to the folder(s) that contain your parser file(s). The Binary-File-Viewer will observe these locations. If a file is changed (on disk) it is automatically read and used for parsing. Normally you would add an absolute paths. If you add a relative path here the workspace folder will be automatically added to it. You easily add paths with a right-click on the folder in vscode explorer, copy the path and paste it here.",
"items": {
"type": "string"
}
}
}
},
"commands": [
{
"command": "binary-file-viewer.help",
"title": "Show Help",
"category": "Binary File Viewer"
},
{
"command": "binary-file-viewer.open",
"title": "Open with 'Binary File Viewer'",
"category": "Binary File Viewer"
}
],
"menus": {
"commandPalette": [
{
"command": "binary-file-viewer.help"
},
{
"command": "binary-file-viewer.open",
"when": "false"
}
],
"explorer/context": [
{
"group": "navigation",
"command": "binary-file-viewer.open"
}
]
},
"walkthroughs": [
{
"id": "walkthrough",
"title": "Binary File Viewer - Walkthrough",
"description": "The 'Binary-File-Viewer' is a framework that let's you create custom binary file viewers.",
"steps": [
{
"id": "getHelp",
"title": "Get Help",
"description": "To get help use the command palette and enter 'Binary file Viewer: Show Help'.\n[Run Command](command:binary-file-viewer.help)\nTip: Inside the help view you can use CTRL-F to search.",
"media": {
"image": "assets/local/walkthroughs/show_help.gif",
"altText": ""
},
"completionEvents": [
"onCommand:binary-file-viewer.help"
]
},
{
"id": "theConcept",
"title": "The Concept",
"description": "You have to create so-called custom parser files to decode a binary file. With this approach it is easy to write custom viewers for files where no vscode file viewer extension exists or for your own proprietary file formats.",
"media": {
"markdown": "assets/local/walkthroughs/empty.md"
}
},
{
"id": "setParserFolder",
"title": "Change Parser Folder",
"description": "At first choose a **location for your parser files**. The 'Binary File Viewer' will use these files for decoding.\nCreate a new folder (e.g. outside vscode), enter vscode's preferences and add the absolute path of this folder.",
"media": {
"image": "assets/local/walkthroughs/settings_folder.gif",
"altText": ""
},
"completionEvents": [
"onSettingChanged:binary-file-viewer.parserFolders"
]
},
{
"id": "createParserFile",
"title": "Create a Parser File",
"description": "Open the parser folder (see previous step). Add a new empty file to it with a '.js' extension. E.g. 'wav.js'.",
"media": {
"markdown": "assets/local/walkthroughs/empty.md"
}
},
{
"id": "templateParserFile",
"title": "Fill Parser File with a Template",
"description": "Use the code snippet ('binary...') to create the parser skeleton.",
"media": {
"image": "assets/local/walkthroughs/snippet_usage.gif",
"altText": ""
}
},
{
"id": "modifyExtParserFile",
"title": "Choose the File Extension",
"description": "In the 'registerFileType' function you can determine for what files your parser will be executed.\nChange the string for the file extension. E.g for a '*.wav' file decoder choose 'wav'.",
"media": {
"image": "assets/local/walkthroughs/file_extension.gif",
"altText": ""
}
},
{
"id": "modifyParser",
"title": "Implement a Parser",
"description": "In the 'registerParser' function you can decode the binary file.\nAdd the code shown here.",
"media": {
"markdown": "assets/local/walkthroughs/modify_parser.md"
}
},
{
"id": "viewFile",
"title": "View the Decoded Binary File",
"description": "Right-click the file and choose 'Open with 'Binary File Viewer'.",
"media": {
"image": "assets/local/walkthroughs/view_binfile.gif",
"altText": ""
}
},
{
"id": "navigation",
"title": "Navigation",
"description": "If you have the parser (js) file open and then click on the offset value of the decoded binary file, the function that was used to create the row will become selected.",
"media": {
"image": "assets/help/help6.gif",
"altText": ""
}
},
{
"id": "interactive",
"title": "Interactive Usage",
"description": "If you open the parser file and the decoded binary file side-by-side you can easily extend your parser and watch the effect in the decoding immediately.\nJust save your parser file to update the decoded file.",
"media": {
"image": "assets/help/help7.gif",
"altText": ""
}
}
]
}
],
"snippets": [
{
"language": "javascript",
"path": "assets/local/codesnippets.json"
}
]
},
"scripts": {
"watch-tsc": "tsc -w -p ./",
"test": "mocha -u bdd ./out/tests/",
"vscode:prepublish": "npm run esbuild-node -- --minify && npm run esbuild-browser -- --minify",
"esbuild-node": "esbuild ./src/extension.ts --bundle --outdir=out --external:vscode --format=cjs --platform=node",
"esbuild-browser": "esbuild ./src/html/parser.ts --bundle --outdir=out/html --platform=browser",
"watch-node": "npm run esbuild-node -- --sourcemap --watch",
"watch-browser": "npm run esbuild-browser -- --sourcemap --watch",
"package": "vsce package"
},
"dependencies": {
"chart.js": "^4.4.2",
"chartjs-plugin-zoom": "^2.0.1",
"hammerjs": "^2.0.8",
"path": "^0.12.7",
"posthtml": "^0.16.6",
"posthtml-toc": "^1.0.3",
"showdown": "^2.1.0"
},
"devDependencies": {
"@types/node": "^20.11.30",
"@types/vscode": "^1.75.0",
"@types/vscode-webview": "^1.57.5",
"esbuild": "^0.20.2",
"@types/mocha": "10.0.6",
"mocha": "^10.4.0",
"source-map-support": "^0.5.21",
"typescript": "^5.4.3"
}
}