package.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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.74",
  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.54",
  64. "require-from-string": "^2.0.2",
  65. "solc": "^0.6.11",
  66. "solhint": "^3.0.0",
  67. "solium": "^1.2.5",
  68. "solparse": "^2.2.8",
  69. "vscode-languageclient": "^5.2.1",
  70. "vscode-languageserver": "^5.2.1",
  71. "@solidity-parser/parser": "^0.6.2",
  72. "yaml-js": "0.2.3"
  73. },
  74. "devDependencies": {
  75. "@types/isomorphic-fetch": "0.0.35",
  76. "@types/node": "^11.15.3",
  77. "ts-node": "^7.0.1",
  78. "tslint": "^5.20.1",
  79. "typescript": "^3.7.3",
  80. "vscode": "^1.1.36"
  81. },
  82. "nyc": {
  83. "extension": [
  84. ".ts"
  85. ],
  86. "include": [
  87. "src/**/*.ts"
  88. ],
  89. "exclude": [
  90. "**/*.d.ts",
  91. "out",
  92. "dist"
  93. ],
  94. "all": true
  95. },
  96. "contributes": {
  97. "configuration": {
  98. "type": "object",
  99. "title": "Solidity configuration",
  100. "properties": {
  101. "solidity.enableLocalNodeCompiler": {
  102. "type": "boolean",
  103. "default": true,
  104. "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'"
  105. },
  106. "solidity.compileUsingRemoteVersion": {
  107. "type": "string",
  108. "default": "",
  109. "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"
  110. },
  111. "solidity.compilerOptimization": {
  112. "type": "number",
  113. "default": 200,
  114. "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."
  115. },
  116. "solidity.compileUsingLocalVersion": {
  117. "type": "string",
  118. "default": "",
  119. "description": "Compile using a local solc binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'"
  120. },
  121. "solidity.linter": {
  122. "type": [
  123. "boolean",
  124. "string"
  125. ],
  126. "default": "solium",
  127. "description": "Enables solhint linting. Possible options 'solhint' and 'solium'"
  128. },
  129. "solidity.solhintRules": {
  130. "type": [
  131. "object"
  132. ],
  133. "default": null,
  134. "description": "Solhint linting validation rules"
  135. },
  136. "solidity.formatter": {
  137. "type": "string",
  138. "default": "prettier",
  139. "enum": [
  140. "none",
  141. "prettier"
  142. ],
  143. "description": "Enables / disables the solidity formatter (prettier solidity default)"
  144. },
  145. "solidity.enabledSolium": {
  146. "type": [
  147. "boolean"
  148. ],
  149. "default": false,
  150. "description": "Enables solium linting. DEPRECATED: Use \"linter\" instead"
  151. },
  152. "solidity.soliumRules": {
  153. "type": [
  154. "object"
  155. ],
  156. "default": {
  157. "imports-on-top": 0,
  158. "variable-declarations": 0,
  159. "indentation": [
  160. "off",
  161. 4
  162. ],
  163. "quotes": [
  164. "off",
  165. "double"
  166. ]
  167. },
  168. "description": "Solium linting validation rules"
  169. },
  170. "solidity.enabledAsYouTypeCompilationErrorCheck": {
  171. "type": "boolean",
  172. "default": true,
  173. "description": "Enables as you type compilation of the document and error highlighting"
  174. },
  175. "solidity.validationDelay": {
  176. "type": "number",
  177. "default": 1500,
  178. "description": "Delay to trigger the validation of the changes of the current document (compilation, solium)"
  179. },
  180. "solidity.packageDefaultDependenciesDirectory": {
  181. "type": "string",
  182. "default": "node_modules",
  183. "description": "Default directory for Packages Dependencies, i.e: 'node_modules', 'lib'. This is used to avoid typing imports with that path prefix"
  184. },
  185. "solidity.packageDefaultDependenciesContractsDirectory": {
  186. "type": "string",
  187. "default": "contracts",
  188. "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"
  189. }
  190. }
  191. },
  192. "languages": [
  193. {
  194. "id": "solidity",
  195. "aliases": [
  196. "Solidity",
  197. "solidity"
  198. ],
  199. "extensions": [
  200. ".sol"
  201. ],
  202. "configuration": "./solidity.configuration.json"
  203. }
  204. ],
  205. "commands": [
  206. {
  207. "command": "solidity.compile.active",
  208. "title": "Solidity: Compile Contract"
  209. },
  210. {
  211. "command": "solidity.compile",
  212. "title": "Solidity: Compile All"
  213. },
  214. {
  215. "command": "solidity.compilerInfo",
  216. "title": "Solidity: Compiler Information"
  217. },
  218. {
  219. "command": "solidity.solcReleases",
  220. "title": "Solidity: Get solidity releases"
  221. },
  222. {
  223. "command": "solidity.codegenNethereumCodeGenSettings",
  224. "title": "Solidity: Create 'nethereum-gen.settings' with default values at root"
  225. },
  226. {
  227. "command": "solidity.codegenCSharpProject",
  228. "title": "Solidity: Code generate CSharp contract definition"
  229. },
  230. {
  231. "command": "solidity.compileAndCodegenCSharpProject",
  232. "title": "Solidity: Compile and Code generate CSharp contract definition"
  233. },
  234. {
  235. "command": "solidity.codegenVbNetProject",
  236. "title": "Solidity: Code generate VB.Net contract definition"
  237. },
  238. {
  239. "command": "solidity.compileAndCodegenVbNetProject",
  240. "title": "Solidity: Compile and Code generate VB.Net contract definition"
  241. },
  242. {
  243. "command": "solidity.codegenFSharpProject",
  244. "title": "Solidity: Code generate FSharp contract definition"
  245. },
  246. {
  247. "command": "solidity.compileAndCodegenFSharpProject",
  248. "title": "Solidity: Compile and Code generate FSharp contract definition"
  249. },
  250. {
  251. "command": "solidity.codegenCSharpProjectAll",
  252. "title": "Solidity: Code generate CSharp Project from all compiled files"
  253. },
  254. {
  255. "command": "solidity.codegenVbNetProjectAll",
  256. "title": "Solidity: Code generate VB.Net Project from all compiled files"
  257. },
  258. {
  259. "command": "solidity.codegenFSharpProjectAll",
  260. "title": "Solidity: Code generate FSharp Project from all compiled files"
  261. },
  262. {
  263. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  264. "title": "Solidity: Code generate CSharp Definitions for Abi files in current folder"
  265. },
  266. {
  267. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  268. "title": "Solidity: Code generate VB.Net Definitions for Abi files in current folder"
  269. },
  270. {
  271. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  272. "title": "Solidity: Code generate FSharp Definitions for Abi files in current folder"
  273. },
  274. {
  275. "command": "solidity.fixDocument",
  276. "title": "Solidity: Fix document rules using Solium"
  277. },
  278. {
  279. "command": "solidity.selectWorkspaceRemoteSolcVersion",
  280. "title": "Solidity: Change workspace compiler version (Remote)"
  281. },
  282. {
  283. "command": "solidity.selectGlobalRemoteSolcVersion",
  284. "title": "Solidity: Change global compiler version (Remote)"
  285. }
  286. ],
  287. "menus": {
  288. "commandPalette": [
  289. {
  290. "when": "resourceExtname == .abi || resourceExtname == .json",
  291. "command": "solidity.codegenCSharpProject"
  292. },
  293. {
  294. "when": "resourceExtname == .abi || resourceExtname == .json",
  295. "command": "solidity.codegenVbNetProject"
  296. },
  297. {
  298. "when": "resourceExtname == .abi || resourceExtname == .json",
  299. "command": "solidity.codegenFSharpProject"
  300. },
  301. {
  302. "when": "editorLangId == 'solidity'",
  303. "command": "solidity.compile.active"
  304. },
  305. {
  306. "when": "editorLangId == 'solidity'",
  307. "command": "solidity.compile"
  308. }
  309. ],
  310. "editor/context": [
  311. {
  312. "when": "editorLangId == 'solidity'",
  313. "command": "solidity.compile.active",
  314. "group": "1_solidity"
  315. },
  316. {
  317. "when": "editorLangId == 'solidity'",
  318. "command": "solidity.compile",
  319. "group": "1_solidity"
  320. },
  321. {
  322. "when": "editorLangId == 'solidity'",
  323. "command": "solidity.compilerInfo",
  324. "group": "1_solidity"
  325. },
  326. {
  327. "when": "editorLangId == 'solidity'",
  328. "command": "solidity.solcReleases",
  329. "group": "2_solidity"
  330. },
  331. {
  332. "when": "editorLangId == 'solidity'",
  333. "command": "solidity.selectGlobalRemoteSolcVersion",
  334. "group": "2_solidity"
  335. },
  336. {
  337. "when": "editorLangId == 'solidity'",
  338. "command": "solidity.selectWorkspaceRemoteSolcVersion",
  339. "group": "2_solidity"
  340. },
  341. {
  342. "when": "editorLangId == 'solidity'",
  343. "command": "solidity.codegenNethereumCodeGenSettings",
  344. "group": "3_solidity"
  345. },
  346. {
  347. "when": "editorLangId == 'solidity'",
  348. "command": "solidity.compileAndCodegenCSharpProject",
  349. "group": "3_solidity"
  350. },
  351. {
  352. "when": "editorLangId == 'solidity'",
  353. "command": "solidity.compileAndCodegenVbNetProject",
  354. "group": "3_solidity"
  355. },
  356. {
  357. "when": "editorLangId == 'solidity'",
  358. "command": "solidity.compileAndCodegenFSharpProject",
  359. "group": "3_solidity"
  360. },
  361. {
  362. "when": "resourceExtname == .abi",
  363. "command": "solidity.codegenCSharpProject",
  364. "group": "3_solidity"
  365. },
  366. {
  367. "when": "resourceExtname == .abi",
  368. "command": "solidity.codegenVbNetProject",
  369. "group": "3_solidity"
  370. },
  371. {
  372. "when": "resourceExtname == .abi",
  373. "command": "solidity.codegenFSharpProject",
  374. "group": "3_solidity"
  375. },
  376. {
  377. "when": "resourceExtname == .abi",
  378. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  379. "group": "3_solidity"
  380. },
  381. {
  382. "when": "resourceExtname == .abi",
  383. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  384. "group": "3_solidity"
  385. },
  386. {
  387. "when": "resourceExtname == .abi",
  388. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  389. "group": "3_solidity"
  390. }
  391. ],
  392. "explorer/context": [
  393. {
  394. "when": "resourceExtname == .abi",
  395. "command": "solidity.codegenCSharpProject",
  396. "group": "3_solidity"
  397. },
  398. {
  399. "when": "resourceExtname == .abi",
  400. "command": "solidity.codegenVbNetProject",
  401. "group": "3_solidity"
  402. },
  403. {
  404. "when": "resourceExtname == .abi",
  405. "command": "solidity.codegenFSharpProject",
  406. "group": "3_solidity"
  407. },
  408. {
  409. "when": "editorLangId == 'solidity'",
  410. "command": "solidity.compile.active",
  411. "group": "2_solidity"
  412. },
  413. {
  414. "when": "editorLangId == 'solidity'",
  415. "command": "solidity.compile",
  416. "group": "2_solidity"
  417. },
  418. {
  419. "when": "resourceExtname == .abi",
  420. "command": "solidity.codegenCSharpProjectAllAbiCurrent",
  421. "group": "3_solidity"
  422. },
  423. {
  424. "when": "resourceExtname == .abi",
  425. "command": "solidity.codegenVbNetProjectAllAbiCurrent",
  426. "group": "3_solidity"
  427. },
  428. {
  429. "when": "resourceExtname == .abi",
  430. "command": "solidity.codegenFSharpProjectAllAbiCurrent",
  431. "group": "3_solidity"
  432. }
  433. ]
  434. },
  435. "keybindings": [
  436. {
  437. "command": "solidity.compile.active",
  438. "key": "f5",
  439. "mac": "f5",
  440. "when": "editorTextFocus && editorLangId == 'solidity'"
  441. },
  442. {
  443. "command": "solidity.compile",
  444. "key": "Ctrl+f5",
  445. "mac": "Cmd+f5",
  446. "when": "editorTextFocus && editorLangId == 'solidity'"
  447. }
  448. ],
  449. "snippets": [
  450. {
  451. "language": "solidity",
  452. "path": "./snippets/solidity.json"
  453. }
  454. ],
  455. "grammars": [
  456. {
  457. "language": "solidity",
  458. "scopeName": "source.solidity",
  459. "path": "./syntaxes/solidity.json"
  460. }
  461. ]
  462. }
  463. }