-
Notifications
You must be signed in to change notification settings - Fork 23
Create a new generated npm workspace for typescript ANTLR generated code #1371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,20 @@ | ||||||||||
{ | ||||||||||
"name": "@webstatus.dev/ts-antlrv4", | ||||||||||
"version": "1.0.0", | ||||||||||
"description": "TypeScript ANTLR4 generated code for webstatus.dev", | ||||||||||
"main": "dist/index.js", | ||||||||||
"types": "dist/index.d.ts", | ||||||||||
"license": "Apache-2.0", | ||||||||||
"scripts": { | ||||||||||
"build": "tsc", | ||||||||||
"clean": "rimraf dist" | ||||||||||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We should rely on the system rm command. |
||||||||||
}, | ||||||||||
"dependencies": { | ||||||||||
"antlr4": "^4.13.1" | ||||||||||
}, | ||||||||||
"devDependencies": { | ||||||||||
"@types/antlr4": "^4.9.3", | ||||||||||
"typescript": "^5.0.0", | ||||||||||
"rimraf": "^5.0.0" | ||||||||||
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can remove this
Suggested change
|
||||||||||
} | ||||||||||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, we should have a common tsconfig that both the frontend and this package extend |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"module": "ES2020", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"outDir": "./dist", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"include": [ | ||
"antlr/**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"dist" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a new target like:
build-antlr-ts
It should call the npm run build command in the
lib/gen/antlrv4/ts-antlrv4
directory.We currently have one shot commands such as make start-local and make debug-local and make precommit and make playwright-test. It will be necessary to add this target as a pre-requisite target for those.
https://github.com/GoogleChrome/webstatus.dev/blob/401f3e814e1ce0d6eebbd73d77c2bafd3a3c3f1f/DEVELOPMENT.md
https://github.com/GoogleChrome/webstatus.dev/blob/401f3e814e1ce0d6eebbd73d77c2bafd3a3c3f1f/docs/testing.md