package.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. {
  2. "name": "solidity",
  3. "description": "Ethereum Solidity Language for Visual Studio Code",
  4. "keywords": [
  5. "solidity",
  6. "ethereum",
  7. "blockchain",
  8. "compiler",
  9. "solium",
  10. "nethereum",
  11. "solhint"
  12. ],
  13. "version": "0.0.75",
  14. "publisher": "JuanBlanco",
  15. "engines": {
  16. "vscode": "^1.30.0"
  17. },
  18. "contributors": [
  19. "Juan Blanco"
  20. ],
  21. "bugs": {
  22. "url": "https://github.com/juanfranblanco/vscode-solidity/issues"
  23. },
  24. "icon": "images/icon.png",
  25. "repository": {
  26. "type": "git",
  27. "url": "https://github.com/juanfranblanco/vscode-solidity"
  28. },
  29. "categories": [
  30. "Programming Languages",
  31. "Snippets"
  32. ],
  33. "activationEvents": [
  34. "onLanguage:solidity",
  35. "onCommand:solidity.compile",
  36. "onCommand:solidity.codegenNethereumCodeGenSettings",
  37. "onCommand:solidity.compile.active",
  38. "onCommand:solidity.codegenCSharpProject",
  39. "onCommand:solidity.codegenVbNetProject",
  40. "onCommand:solidity.codegenFSharpProject",
  41. "onCommand:solidity.codegenCSharpProjectAll",
  42. "onCommand:solidity.codegenVbNetProjectAll",
  43. "onCommand:solidity.codegenFSharpProjectAll",
  44. "onCommand:solidity.fixDocument"
  45. ],
  46. "main": "./out/src/extension",
  47. "scripts": {
  48. "vscode:prepublish": "npm run compile",
  49. "compile": "tsc -p ./",
  50. "watch": "tsc -watch -p ./",
  51. "prepare": "node ./node_modules/vscode/bin/install",
  52. "test": "nyc --require ts-node/register --require source-map-support/register mocha test/**/*.spec.ts"
  53. },
  54. "dependencies": {
  55. "ajv": "^6.10.2",
  56. "ajv-keywords": "^3.4.1",
  57. "chai": "^4.2.0",
  58. "find-cache-dir": "^2.1.0",
  59. "fs-extra": "^4.0.3",
  60. "mkdirp": "^0.5.1",
  61. "nethereum-codegen": "^1.0.12",
  62. "prettier": "^2.0.2",
  63. "prettier-plugin-solidity": "1.0.0-alpha.55",
  64. "require-from-string": "^2.0.2",
  65. "solc": "^0.7.0",
  66. "solhint": "^3.1.0",
  67. "solium": "^1.2.5",
  68. "solparse": "^2.2.8",
  69. "vscode-languageclient": "^5.2.1",
  70. "vscode-languageserver": "^5.2.1",
  71. "yaml-js": "0.2.3"
  72. },
  73. "devDependencies": {
  74. "@types/isomorphic-fetch": "0.0.35",
  75. "@types/node": "^11.15.3",
  76. "ts-node": "^7.0.1",
  77. "tslint": "^5.20.1",
  78. "typescript": "^3.7.3",
  79. "vscode": "^1.1.36"
  80. },
  81. "nyc": {
  82. "extension": [
  83. ".ts"
  84. ],
  85. "include": [
  86. "src/**/*.ts"
  87. ],
  88. "exclude": [
  89. "**/*.d.ts",
  90. "out",
  91. "dist"
  92. ],
  93. "all": true
  94. },
  95. "contributes": {
  96. "configuration": {
  97. "type": "object",
  98. "title": "Solidity configuration",
  99. "properties": {
  100. "solidity.enableLocalNodeCompiler": {
  101. "type": "boolean",
  102. "default": true,
  103. "description": "If enabled (default true) and a solc version is found in the workspace folder 'node_modules', it will use that version of solc, overriding local or remote settings'"
  104. },
  105. "solidity.compileUsingRemoteVersion": {
  106. "type": "string",
  107. "default": "",
  108. "description": "Compile downloading a remote solc binary file, for example: 'latest' or 'v0.4.3+commit.2353da71', use the command 'Solidity: Get solidity releases' to list all versions"
  109. },
  110. "solidity.compilerOptimization": {
  111. "type": "number",
  112. "default": 200,
  113. "description": "Optimize for how many times you intend to run the code. Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage."
  114. },
  115. "solidity.compileUsingLocalVersion": {
  116. "type": "string",
  117. "default": "",
  118. "description": "Compile using a local solc binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'"
  119. },
  120. "solidity.linter": {
  121. "type": "string",
  122. "enum": [
  123. "",
  124. "solhint",
  125. "solium"
  126. ],
  127. "default": "solhint",
  128. "description": "Enables linting using either solium (ethlint) or solhint. Possible options 'solhint' and 'solium', the default is solhint"
  129. },
  130. "solidity.solhintRules": {
  131. "type": [
  132. "object"
  133. ],
  134. "default": null,
  135. "description": "Solhint linting validation rules"
  136. },
  137. "solidity.formatter": {
  138. "type": "string",
  139. "default": "prettier",
  140. "enum": [
  141. "none",
  142. "prettier"
  143. ],
  144. "description": "Enables / disables the solidity formatter (prettier solidity default)"
  145. },
  146. "solidity.soliumRules": {
  147. "type": [
  148. "object"
  149. ],
  150. "default": {
  151. "imports-on-top": 0,
  152. "variable-declarations": 0,
  153. "indentation": [
  154. "off",
  155. 4
  156. ],
  157. "quotes": [
  158. "off",
  159. "double"
  160. ]
  161. },
  162. "description": "Solium linting validation rules"
  163. },
  164. "solidity.enabledAsYouTypeCompilationErrorCheck": {
  165. "type": "boolean",
  166. "default": true,
  167. "description": "Enables as you type compilation of the document and error highlighting"
  168. },
  169. "solidity.validationDelay": {
  170. "type": "number",
  171. "default": 1500,
  172. "description": "Delay to trigger the validation of the changes of the current document (compilation, solium)"
  173. },
  174. "solidity.packageDefaultDependenciesDirectory": {
  175. "type": "string",
  176. "default": "node_modules",
  177. "description": "Default directory for Packages Dependencies, i.e: 'node_modules', 'lib'. This is used to avoid typing imports with that path prefix"
  178. },
  179. "solidity.packageDefaultDependenciesContractsDirectory": {
  180. "type": "string",
  181. "default": "",
  182. "description": "Default directory where the Package Dependency store its contracts, i.e: 'src', 'contracts', or just a blank string '', this is used to avoid typing imports with subfolder paths"
  183. }
  184. }
  185. },
  186. "languages": [
  187. {
  188. "id": "solidity",
  189. "aliases": [
  190. "Solidity",
  191. "solidity"
  192. ],
  193. "extensions": [
  194. ".sol"
  195. ],
  196. "configuration": "./solidity.configuration.json"
  197. }
  198. ],
  199. "commands": [
  200. {
  201. "command": "solidity.compile.active",
  202. "title": "Solidity: Compile Contract"
  203. },
  204. {
  205. "command": "solidity.compile",
  206. "title": "Solidity: Compile All"
  207. },
  208. {
  209. "command": "solidity.compilerInfo",
  210. "title": "Solidity: Compiler Information"
  211. },
  212. {
  213. "command": "solidity.solcReleases",
  214. "title": "Solidity: Get solidity releases"
  215. },
  216. {
  217. "command": "solidity.codegenNethereumCodeGenSettings",
  218. "title": "Solidity: Create 'nethereum-gen.settings' with default values at root"
  219. },
  220. {
  221. "command": "solidity.codegenCSharpProject",
  222. "title": "Solidity: Code generate CSharp contract definition"
  223. },
  224. {
  225. "command": "solidity.compileAndCodegenCSharpProject",
  226. "title": "Solidity: Compile and Code generate CSharp contract definition"
  227. },
  228. {
  229. "command": "solidity.codegenVbNetProject",
  230. "title": "Solidity: Code generate VB.Net contract definition"
  231. },
  232. {
  233. "command": "solidity.compileAndCodegenVbNetProject",
  234. "title": "Solidity: Compile and Code generate VB.Net contract definition"
  235. },
  236. {
  237. "command": "solidity.codegenFSharpProject",
  238. "title": "Solidity: Code generate FSharp contract definition"
  239. },
  240. {
  241. "command": "solidity.compileAndCodegenFSharpProject",
  242. "title": "Solidity: Compile and Code generate FSharp contract definition"
  243. },
  244. {
  245. "command": "solidity.codegenCSharpProjectAll",
  246. "title": "Solidity: Code generate CSharp Project from all compiled files"
  247. },
  248. {
  249. "command": "solidity.codegenVbNetProjectAll",
  250. "title": "Solidity: Code generate VB.Net Project from all compiled files"
  251. },
  252. {
  253. "command": "solidity.codegenFSharpProjectAll",
  254. "title": "Solidity: Code generate FSharp Project from all compiled files"
  255. },
  256. {
  257. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  258. "title": "Solidity: Code generate CSharp Definitions for Abi files in current folder"
  259. },
  260. {
  261. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  262. "title": "Solidity: Code generate VB.Net Definitions for Abi files in current folder"
  263. },
  264. {
  265. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  266. "title": "Solidity: Code generate FSharp Definitions for Abi files in current folder"
  267. },
  268. {
  269. "command": "solidity.fixDocument",
  270. "title": "Solidity: Fix document rules using Solium"
  271. },
  272. {
  273. "command": "solidity.selectWorkspaceRemoteSolcVersion",
  274. "title": "Solidity: Change workspace compiler version (Remote)"
  275. },
  276. {
  277. "command": "solidity.selectGlobalRemoteSolcVersion",
  278. "title": "Solidity: Change global compiler version (Remote)"
  279. }
  280. ],
  281. "menus": {
  282. "commandPalette": [
  283. {
  284. "when": "resourceExtname == .abi || resourceExtname == .json",
  285. "command": "solidity.codegenCSharpProject"
  286. },
  287. {
  288. "when": "resourceExtname == .abi || resourceExtname == .json",
  289. "command": "solidity.codegenVbNetProject"
  290. },
  291. {
  292. "when": "resourceExtname == .abi || resourceExtname == .json",
  293. "command": "solidity.codegenFSharpProject"
  294. },
  295. {
  296. "when": "editorLangId == 'solidity'",
  297. "command": "solidity.compile.active"
  298. },
  299. {
  300. "when": "editorLangId == 'solidity'",
  301. "command": "solidity.compile"
  302. }
  303. ],
  304. "editor/context": [
  305. {
  306. "when": "editorLangId == 'solidity'",
  307. "command": "solidity.compile.active",
  308. "group": "1_solidity"
  309. },
  310. {
  311. "when": "editorLangId == 'solidity'",
  312. "command": "solidity.compile",
  313. "group": "1_solidity"
  314. },
  315. {
  316. "when": "editorLangId == 'solidity'",
  317. "command": "solidity.compilerInfo",
  318. "group": "1_solidity"
  319. },
  320. {
  321. "when": "editorLangId == 'solidity'",
  322. "command": "solidity.solcReleases",
  323. "group": "2_solidity"
  324. },
  325. {
  326. "when": "editorLangId == 'solidity'",
  327. "command": "solidity.selectGlobalRemoteSolcVersion",
  328. "group": "2_solidity"
  329. },
  330. {
  331. "when": "editorLangId == 'solidity'",
  332. "command": "solidity.selectWorkspaceRemoteSolcVersion",
  333. "group": "2_solidity"
  334. },
  335. {
  336. "when": "editorLangId == 'solidity'",
  337. "command": "solidity.codegenNethereumCodeGenSettings",
  338. "group": "3_solidity"
  339. },
  340. {
  341. "when": "editorLangId == 'solidity'",
  342. "command": "solidity.compileAndCodegenCSharpProject",
  343. "group": "3_solidity"
  344. },
  345. {
  346. "when": "editorLangId == 'solidity'",
  347. "command": "solidity.compileAndCodegenVbNetProject",
  348. "group": "3_solidity"
  349. },
  350. {
  351. "when": "editorLangId == 'solidity'",
  352. "command": "solidity.compileAndCodegenFSharpProject",
  353. "group": "3_solidity"
  354. },
  355. {
  356. "when": "resourceExtname == .abi",
  357. "command": "solidity.codegenCSharpProject",
  358. "group": "3_solidity"
  359. },
  360. {
  361. "when": "resourceExtname == .abi",
  362. "command": "solidity.codegenVbNetProject",
  363. "group": "3_solidity"
  364. },
  365. {
  366. "when": "resourceExtname == .abi",
  367. "command": "solidity.codegenFSharpProject",
  368. "group": "3_solidity"
  369. },
  370. {
  371. "when": "resourceExtname == .abi",
  372. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  373. "group": "3_solidity"
  374. },
  375. {
  376. "when": "resourceExtname == .abi",
  377. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  378. "group": "3_solidity"
  379. },
  380. {
  381. "when": "resourceExtname == .abi",
  382. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  383. "group": "3_solidity"
  384. }
  385. ],
  386. "explorer/context": [
  387. {
  388. "when": "resourceExtname == .abi",
  389. "command": "solidity.codegenCSharpProject",
  390. "group": "3_solidity"
  391. },
  392. {
  393. "when": "resourceExtname == .abi",
  394. "command": "solidity.codegenVbNetProject",
  395. "group": "3_solidity"
  396. },
  397. {
  398. "when": "resourceExtname == .abi",
  399. "command": "solidity.codegenFSharpProject",
  400. "group": "3_solidity"
  401. },
  402. {
  403. "when": "editorLangId == 'solidity'",
  404. "command": "solidity.compile.active",
  405. "group": "2_solidity"
  406. },
  407. {
  408. "when": "editorLangId == 'solidity'",
  409. "command": "solidity.compile",
  410. "group": "2_solidity"
  411. },
  412. {
  413. "when": "resourceExtname == .abi",
  414. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  415. "group": "3_solidity"
  416. },
  417. {
  418. "when": "resourceExtname == .abi",
  419. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  420. "group": "3_solidity"
  421. },
  422. {
  423. "when": "resourceExtname == .abi",
  424. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  425. "group": "3_solidity"
  426. }
  427. ]
  428. },
  429. "keybindings": [
  430. {
  431. "command": "solidity.compile.active",
  432. "key": "f5",
  433. "mac": "f5",
  434. "when": "editorTextFocus && editorLangId == 'solidity'"
  435. },
  436. {
  437. "command": "solidity.compile",
  438. "key": "Ctrl+f5",
  439. "mac": "Cmd+f5",
  440. "when": "editorTextFocus && editorLangId == 'solidity'"
  441. }
  442. ],
  443. "snippets": [
  444. {
  445. "language": "solidity",
  446. "path": "./snippets/solidity.json"
  447. }
  448. ],
  449. "grammars": [
  450. {
  451. "language": "solidity",
  452. "scopeName": "source.solidity",
  453. "path": "./syntaxes/solidity.json"
  454. }
  455. ]
  456. }
  457. }