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