Skip to content
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

Unnecessary ts build step while "npm run test". Ts generated project. #640

Open
2 tasks done
nosbog opened this issue Jul 10, 2023 · 0 comments
Open
2 tasks done

Comments

@nosbog
Copy link

nosbog commented Jul 10, 2023

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Command "fastify generate . --lang=ts" generates:

  • npm script "test": npm run build:ts && tsc -p test/tsconfig.json && tap --ts "test/**/*.test.ts"
  • file: ./test/helper.ts

Inside ./test/helper.ts the variable AppPath is created that ends with "src/app.ts".
Before the tests are run, the code inside the ./dist folder will already be transpiled because the first part of the npm script "test" worked (npm run build:ts).
The app will be transpiled again when "build" function is called (imported from ./test/helper.ts).
You can log used typescript file paths in AutoloadPluginOptions.matchFilter function.

Why not create the AppPath that ends with "dist/app.js" or remove "npm run build:ts" part from the "test" script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant