👷 Adds Rudimentary Build Process

This commit is contained in:
Bruce Markham
2020-03-20 23:50:22 -04:00
parent 3593cf93bc
commit c44d46a251
5 changed files with 32 additions and 3 deletions

3
.gitignore vendored
View File

@@ -0,0 +1,3 @@
node_modules
antlr4ts_out
lib

4
index.ts Normal file
View File

@@ -0,0 +1,4 @@
export * from './antlr4ts_out/VisualBasic6Lexer';
export * from './antlr4ts_out/VisualBasic6Parser';
export * from './antlr4ts_out/VisualBasic6ParserListener';
export * from './antlr4ts_out/VisualBasic6ParserVisitor';

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "vb6-antlr4",
"version": "0.0.1",
"version": "0.0.0-development",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -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",

12
tsconfig.json Normal file
View File

@@ -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__/*"]
}