-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Feature Request: Use ts-node
rather than npm watch
for boilerplate
#1532
Feature Request: Use ts-node
rather than npm watch
for boilerplate
#1532
Comments
Thanks @eladb for pointing to this suggestion in #539. I converted a monorepo project to use this approach (although without the -T option) and it seems to work quite well when sharing the package.json and tsconfig.json for the Stack and its Constructs. Maybe it also works when the Constructs are separate repos/packages but didn't really try it yet. |
@rix0rrr Does the CDK team agree with this change? Happy to submit a PR if that is the case. For people getting introduced to TypeScript through CDK, the boostrapped experience is a little rough. |
Sounds good to me. It will definitely reduce some friction. @Doug-AWS this will require some updates to sample code and workshop once it lands. |
Update sample-app with ts-node in a backwards compatible way (`npm run build` still compiles the code). Closes #1532
This is a suggestion rather than a bug - something to consider for your boilerplate generated by
cdk init
:In my CDK projects I've been doing the following:
And then modifying the
cdk.json
:The
-T
flag skips typechecking, speeding up runtime, as I generally have a test suite / editor that will get cross if there's a typing issue.I've done this as the workflow is a bit easier day to day, and avoids a potential problem when sharing this code with others less familiar with TypeScript where they may not know that they need to compile it & keep that compilation up to date. I also anticipate that people will be directly resistant to this if they're used to Ruby/Python/etc.
The text was updated successfully, but these errors were encountered: