From c44d46a251339237606e220a3bdb0111adb56e1f Mon Sep 17 00:00:00 2001 From: Bruce Markham <219281+brucificus@users.noreply.github.com> Date: Fri, 20 Mar 2020 23:50:22 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Adds=20Rudimentary=20Build=20Pro?= =?UTF-8?q?cess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ index.ts | 4 ++++ package-lock.json | 2 +- package.json | 14 ++++++++++++-- tsconfig.json | 12 ++++++++++++ 5 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 index.ts create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index e69de29..cbda011 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +antlr4ts_out +lib diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..70822ac --- /dev/null +++ b/index.ts @@ -0,0 +1,4 @@ +export * from './antlr4ts_out/VisualBasic6Lexer'; +export * from './antlr4ts_out/VisualBasic6Parser'; +export * from './antlr4ts_out/VisualBasic6ParserListener'; +export * from './antlr4ts_out/VisualBasic6ParserVisitor'; diff --git a/package-lock.json b/package-lock.json index a0a3c91..b35265a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vb6-antlr4", - "version": "0.0.1", + "version": "0.0.0-development", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7b0986d..cd9a903 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,19 @@ "name": "vb6-antlr4", "version": "0.0.1", "description": "", - "main": "index.js", + "files": [ + "lib/**/*" + ], + "main": "lib/index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 0", + "build.cpygrammars": "cpy proleap-vb6/src/main/antlr4/io/proleap/vb6/*.g4 ./antlr4ts_out/", + "build.antlr4ts": "antlr4ts -visitor antlr4ts_out/*.g4", + "postbuild.antlr4ts": "rimraf antlr4ts_out/*.g4", + "build.tsc": "tsc", + "build": "npm run build.cpygrammars && npm run build.antlr4ts && npm run build.tsc", + "prepublishOnly": "npm run build && npm run test", + "postversion": "git push && git push --tags" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..911d39f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "commonjs", + "declaration": true, + "outDir": "./lib", + "strict": true, + "esModuleInterop": true + }, + "include": ["index.ts", "antlr4ts_out"], + "exclude": ["node_modules", "proleap-vb6", "**/__tests__/*"] +}