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

RFC .projenrc.ts support #14

Closed
andrestone opened this issue Jul 9, 2020 · 10 comments
Closed

RFC .projenrc.ts support #14

andrestone opened this issue Jul 9, 2020 · 10 comments

Comments

@andrestone
Copy link
Contributor

andrestone commented Jul 9, 2020

For more complex projects, specially with the monorepo support, wouldn't it be interesting to:

npx projen init typescript --types

Then generate a .projenrc.ts file instead of the .js and incorporate a check on the cli to compile on the fly if .ts file is there?

@andrestone andrestone changed the title Should we support .projenrc.ts? RFC .projenrc.ts support Jul 9, 2020
@eladb
Copy link
Contributor

eladb commented Jul 10, 2020

Yes, why not?

@eladb
Copy link
Contributor

eladb commented Jul 16, 2020

I am having seconds thoughts here. Let's keep it in the backlog for now and see how far we can get with JavaScript.

@eladb
Copy link
Contributor

eladb commented Sep 30, 2020

This will also require ts-node

@andrestone
Copy link
Contributor Author

Maybe npx ts-node as it is in CDK?

@eladb
Copy link
Contributor

eladb commented Oct 1, 2020

That would mean that every time you run projen ts-node will be executed or it has to be installed globally (which means that which ts-node should just work.

This is related to perhaps adding support for other languages. Would be nice to be able to also author projenrc in python for example, which will also have some ambient prerequisites.

I am open to doing that: we can auto-discover the .projenrc file type based on its extension and then require the user to have the "runtime" pre-installed in their system.

@skyrpex
Copy link
Contributor

skyrpex commented Dec 28, 2020

There's also https://github.com/antfu/esno, which uses esbuild to transpile on the fly. I use it with CDK and am pretty happy with it.

Maybe a file like cdk.json would help here to make it customizable?

@eladb
Copy link
Contributor

eladb commented Dec 28, 2020

esbuild does not perform type checking as far as I know, Correct?

@skyrpex
Copy link
Contributor

skyrpex commented Dec 28, 2020

Exactly, it just executes the code. Maybe that's not what you want in this scenario.

@github-actions
Copy link
Contributor

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

@github-actions github-actions bot added the Stale label Jun 30, 2021
@eladb
Copy link
Contributor

eladb commented Jun 30, 2021

Projenrc in typescript is now supported via:

projen new typescript --projenrc-ts

@eladb eladb closed this as completed Jun 30, 2021
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

3 participants