forked from dfinity/vscode-motoko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
236 lines (236 loc) · 8.51 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
{
"name": "vscode-motoko",
"displayName": "Motoko",
"description": "Motoko language support",
"version": "0.16.8",
"publisher": "dfinity-foundation",
"repository": "https://github.com/dfinity/vscode-motoko",
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"Programming Languages"
],
"icon": "assets/logo.png",
"galleryBanner": {
"color": "#000000",
"theme": "dark"
},
"contributes": {
"languages": [
{
"id": "motoko",
"aliases": [
"Motoko",
"motoko"
],
"extensions": [
".mo",
".mo_"
],
"configuration": "./language-configuration.json",
"icon": {
"light": "assets/icons/motoko-color.png",
"dark": "assets/icons/motoko-color.png"
}
},
{
"id": "candid",
"aliases": [
"Candid",
"candid"
],
"extensions": [
".did",
".did_"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "motoko",
"scopeName": "source.mo",
"path": "./syntaxes/Major.tmLanguage"
},
{
"language": "candid",
"scopeName": "source.did",
"path": "./syntaxes/Candid.tmLanguage"
}
],
"configuration": {
"type": "object",
"title": "Motoko",
"properties": {
"motoko.dfx": {
"scope": "resource",
"type": "string",
"default": "dfx",
"description": "Location of the dfx executable"
},
"motoko.legacyLanguageServer": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Use the legacy OCaml language server when `dfx <= 0.11.0`."
},
"motoko.maxNumberOfProblems": {
"scope": "resource",
"type": "integer",
"default": 100,
"description": "Limit the number of warnings and errors generated by the compiler."
},
"motoko.hideWarningRegex": {
"scope": "resource",
"type": "string",
"default": "",
"description": "Hide compiler warnings based on a regular expression."
},
"motoko.trace.server": {
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Trace the communication between VS Code and the language server."
},
"motoko.debugHover": {
"type": "boolean",
"description": "Show debug information when hovering over any part of a Motoko program."
},
"motoko.canister": {
"scope": "resource",
"type": "string",
"default": "",
"description": "The name of the canister you want to develop. If this is blank, we'll use a sensible default."
},
"motoko.formatter": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier"
],
"description": "The Motoko code formatter used by the extension."
}
}
},
"commands": [
{
"command": "motoko.startService",
"title": "Motoko: Restart language server"
},
{
"command": "motoko.deployPlayground",
"title": "Motoko: Deploy (20 minutes)"
},
{
"command": "motoko.importMopsPackage",
"title": "Motoko: Import Mops Package..."
}
],
"jsonValidation": [
{
"fileMatch": "dfx.json",
"url": "https://raw.githubusercontent.com/dfinity/sdk/master/docs/dfx-json-schema.json"
}
],
"snippets": [
{
"language": "motoko",
"path": "./snippets.json"
}
],
"menus": {
"explorer/context": [
{
"when": "resourceLangId == motoko",
"command": "motoko.deployPlayground",
"group": "2_main"
}
],
"editor/context": [
{
"when": "resourceLangId == motoko",
"command": "motoko.deployPlayground",
"group": "2_main"
}
]
}
},
"activationEvents": [],
"main": "./out/extension",
"browser": "./out/browser",
"dependencies": {
"@wasmer/wasi": "1.2.2",
"change-case": "4.1.2",
"execa": "4.1.0",
"fast-glob": "3.2.12",
"ic-mops": "0.45.3",
"ic0": "0.2.7",
"mnemonist": "0.39.5",
"motoko": "3.8.2",
"prettier": "2.8.0",
"prettier-plugin-motoko": "0.9.2",
"semver": "7.6.3",
"url-relative": "1.0.0",
"vscode-languageclient": "8.0.2",
"vscode-languageserver": "8.0.2",
"vscode-languageserver-textdocument": "1.0.7",
"vscode-uri": "3.0.6",
"which": "3.0.0"
},
"devDependencies": {
"@types/jest": "^29.1.1",
"@types/node": "^14",
"@types/prettier": "^2.7.0",
"@types/vscode": "^1.53.0",
"@types/which": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"esbuild": "^0.16.7",
"eslint": "^8.29.0",
"eslint-plugin-jest": "^27.1.6",
"husky": "^8.0.2",
"jest": "^29.1.2",
"lint-staged": "^13.1.0",
"npm-run-all": "^4.1.5",
"shx": "^0.3.4",
"ts-jest": "^29.0.3",
"typescript": "^4.9.3",
"vsce": "^2.15.0"
},
"scripts": {
"prepare": "husky install && cd rust && npm install",
"postinstall": "npm run generate",
"lint": "eslint . --ext ts",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write src",
"precommit": "lint-staged",
"vscode:prepublish": "npm run compile",
"compile": "npm run compile:pre && run-p compile:snippets compile:formatter compile:rust_ && run-p compile:extension compile:browser compile:server compile:motoko",
"compile:pre": "shx rm -rf ./out && shx mkdir -p ./out",
"compile:snippets": "shx cp node_modules/motoko/contrib/snippets.json .",
"compile:formatter": "shx cp node_modules/prettier-plugin-motoko/wasm/pkg/nodejs/wasm_bg.wasm out/wasm_bg.wasm",
"compile:rust_": "",
"compile:rust": "cd rust && npm run build-release && shx cp ./index.node ../out/vscode_motoko.node",
"compile:extension": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --minify",
"compile:browser": "esbuild ./src/browser.ts --bundle --outfile=out/browser.js --external:vscode --format=cjs --platform=node --minify",
"compile:server": "esbuild ./src/server/server.ts --bundle --outfile=out/server.js --external:vscode --format=cjs --platform=node --minify",
"compile:motoko": "esbuild motoko --bundle --outfile=out/motoko.js --format=cjs --platform=node --minify && shx cp -r src/server/compiler out/compiler",
"generate": "node scripts/generate",
"test": "jest",
"package": "npm run generate && vsce package && npm test && npm run --silent lint",
"publish": "vsce publish"
},
"lint-staged": {
"src/**/*.{js,ts,jsx,tsx}": [
"eslint --max-warnings=0 --fix",
"prettier --write"
]
}
}