-
Notifications
You must be signed in to change notification settings - Fork 262
fix(entropy-tester): adjust cli execution and tsconfigs #2773
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 8 Skipped Deployments
|
apps/entropy-tester/package.json
Outdated
@@ -22,7 +22,8 @@ | |||
"test:format": "prettier --check .", | |||
"test:lint": "eslint . --max-warnings 0", | |||
"test:types": "tsc", | |||
"start": "tsc && node cli/run.js" | |||
"dev:start": "tsc && node cli/run.js", |
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.
This is named start:dev
(and the other one is named start:prod
) in other services
apps/entropy-tester/tsconfig.json
Outdated
"extends": "@cprussin/tsconfig/nextjs.json", | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": "@cprussin/tsconfig/base.json", | ||
"compilerOptions": { |
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.
Generally, I will separate out things so that the base tsconfig is just used to check types (i.e. noEmit: true
), and I have an extended tsconfig for actually building. See https://github.com/pyth-network/pyth-crosschain/blob/main/packages/component-library/tsconfig.build.json for an example, and https://github.com/pyth-network/pyth-crosschain/blob/main/packages/component-library/package.json#L22 for the corresponding build script (this one is a bit weird because it's running react compiler but in your case you can just omit the babel
command).
I prefer doing things this way because it allows you to run just a type check as part of CI without actually building. It's a bit pedantic but I do find it nice.
Summary
tsconfig was not working as I hoped for.
How has this been tested?