vscode-ebnf

EBNF for Visual Studio Code
Mirror of https://github.com/Jamozed/vscode-ebnf
git clone http://git.omkov.net/vscode-ebnf
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2021-07-06 09:25:32
Commiteaee3b012e7526d852ff0c623289978886457f3a
Parentd6cb20d9742a26b489d9bea0ce1198bf34cd9824

Add foundations for programmatic language features

Diffstat

A .gitignore | 3 +++
M .vscode/launch.json | 1 +
A .vscode/tasks.json | 12 ++++++++++++
A package-lock.json | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M package.json | 14 +++++++++++++-
A src/extension.ts | 9 +++++++++
A tsconfig.json | 12 ++++++++++++

7 files changed, 115 insertions, 1 deletions

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..89fc38d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.vsix
+/node_modules/
+/out/
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 622b645..85c9f0f 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -6,6 +6,7 @@
 			"type": "extensionHost",
 			"request": "launch",
 			"args": [ "--extensionDevelopmentPath=${workspaceFolder}" ],
+			"preLaunchTask": "npm: watch"
 		}
 	]
 }
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..ce3e46e
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,12 @@
+{
+	"version": "2.0.0",
+	"tasks": [
+		{
+			"type": "npm",
+			"script": "watch",
+			"isBackground": true,
+			"presentation": { "reveal": "never" },
+			"group": { "kind": "build", "isDefault": true }
+		}
+	]
+}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..63bd47b
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,65 @@
+{
+	"name": "vscode-ebnf",
+	"version": "1.1.0-alpha.1",
+	"lockfileVersion": 2,
+	"requires": true,
+	"packages": {
+		"": {
+			"version": "1.1.0-alpha.1",
+			"license": "OLPE",
+			"devDependencies": {
+				"@types/node": "^16.0.0",
+				"@types/vscode": "^1.57.1",
+				"typescript": "^4.3.5"
+			},
+			"engines": {
+				"vscode": "^1.0.0"
+			}
+		},
+		"node_modules/@types/node": {
+			"version": "16.0.0",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",
+			"integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==",
+			"dev": true
+		},
+		"node_modules/@types/vscode": {
+			"version": "1.57.1",
+			"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.57.1.tgz",
+			"integrity": "sha512-I+NlKdnDnUZZ5HYu3F99ye3ERORnoqdyPer6nXVC7ToU/4WEjrCQOlLosmLyVoi75+UbKCJMFqTgeZuID+8yoA==",
+			"dev": true
+		},
+		"node_modules/typescript": {
+			"version": "4.3.5",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+			"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
+			"dev": true,
+			"bin": {
+				"tsc": "bin/tsc",
+				"tsserver": "bin/tsserver"
+			},
+			"engines": {
+				"node": ">=4.2.0"
+			}
+		}
+	},
+	"dependencies": {
+		"@types/node": {
+			"version": "16.0.0",
+			"resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",
+			"integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==",
+			"dev": true
+		},
+		"@types/vscode": {
+			"version": "1.57.1",
+			"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.57.1.tgz",
+			"integrity": "sha512-I+NlKdnDnUZZ5HYu3F99ye3ERORnoqdyPer6nXVC7ToU/4WEjrCQOlLosmLyVoi75+UbKCJMFqTgeZuID+8yoA==",
+			"dev": true
+		},
+		"typescript": {
+			"version": "4.3.5",
+			"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+			"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
+			"dev": true
+		}
+	}
+}
diff --git a/package.json b/package.json
index 5f8996a..2644bf2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "vscode-ebnf",
-	"version": "1.0.3",
+	"version": "1.1.0-alpha.1",
 	"publisher": "OMKOV",
 	"engines": { "vscode": "^1.0.0" },
 	"license": "OLPE",
@@ -29,5 +29,17 @@
 	"repository": {
 		"type": "git",
 		"url": "https://github.com/Jamozed/vscode-ebnf"
+	},
+	"activationEvents": [ "onLanguage:ebnf" ],
+	"main": "./out/extension.js",
+	"scripts": {
+		"vscode:prepublish": "npm run compile",
+		"compile": "tsc -p ./",
+		"watch": "tsc -watch -p ./"
+	},
+	"devDependencies": {
+		"@types/node": "^16.0.0",
+		"@types/vscode": "^1.57.1",
+		"typescript": "^4.3.5"
 	}
 }
diff --git a/src/extension.ts b/src/extension.ts
new file mode 100644
index 0000000..20cb403
--- /dev/null
+++ b/src/extension.ts
@@ -0,0 +1,9 @@
+// estension.ts
+// Copyright (C) 2021, Jakob Wakeling
+// All rights reserved.
+
+import * as vscode from "vscode";
+
+export function activate(context: vscode.ExtensionContext) {
+	console.log("EBNF for Visual Studio Code activated");
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..6e1fc41
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,12 @@
+{
+	"compilerOptions": {
+		"module": "commonjs",
+		"target": "es2019",
+		"lib": [ "ES2019" ],
+		"outDir": "out",
+		"sourceMap": true,
+		"strict": true,
+		"rootDir": "src"
+	},
+	"exclude": [ "node_modules", ".vscode-test" ]
+}