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

TS Config cleanup 3 #2410

Open
wants to merge 6 commits into
base: filip-ts-config-cleanup-2
Choose a base branch
from

Conversation

sodic
Copy link
Contributor

@sodic sodic commented Dec 10, 2024

Fixing stuff from #2276 and personal notes.

@sodic sodic mentioned this pull request Dec 10, 2024
@sodic sodic changed the base branch from main to filip-ts-config-cleanup-2 December 10, 2024 13:00
Comment on lines 120 to 136
-- We're using tsc to compile the *.wasp.ts file into a JS file.
--
-- The compilation rules mostly come from tsconfig.wasp.json but also
-- include several overrides:
-- - We don't keep all the rules in tsconfig.wasp.json because it
-- would give users a way to break things.
-- - We don't keep all the rules here (inline) because users would
-- suffer bad DX (no IDE support in *.wasp.ts file).
[ "tsc",
"-p",
fromAbsFile (waspProjectDir </> tsconfigNodeFileInWaspProjectDir),
-- The tsconfig.wasp.json file has the noEmit flag on.
-- The file only exists IDE support, and we don't want users to
-- accidentally chage the outDir.
--
-- Here, to actually generate the JS file in the desired location,
-- we must turn off the noEmit flag and specify the outDir.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original discussion: #2276 (comment)

Comment on lines -55 to -56
getModelNames :: Schema -> [String]
getModelNames schema = map Model.getName $ getModels schema
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed here: #2276 (comment)

@sodic sodic marked this pull request as ready for review December 10, 2024 13:44
Copy link
Contributor

@infomiho infomiho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! But left one comment, check it out please.

waspc/src/Wasp/Project/WaspFile.hs Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

3 participants