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

Supporting plopfile.ts .ts extension #416

Closed
WildOsk opened this issue Feb 7, 2024 · 5 comments
Closed

Supporting plopfile.ts .ts extension #416

WildOsk opened this issue Feb 7, 2024 · 5 comments

Comments

@WildOsk
Copy link

WildOsk commented Feb 7, 2024

I have read some threads on github about this but i dont get what to do.

I receive the following error you already know:

[PLOP] Something went wrong with reading your plop file TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

@David-Tsui
Copy link

David-Tsui commented Mar 11, 2024

You can compile it to js manually.
the module option might different between repos. If not working, please refer to ts compiler options.

/** package.json */
"scripts": {
  "build-plop": tsc --module nodenext ./plopfile.ts --outDir . && prettier --write ./plopfile.js
}

@WildOsk
Copy link
Author

WildOsk commented Mar 15, 2024

But i guess at some point this will be supported natively(?) without needing to compile it first?

@amwmedia
Copy link
Member

I think @crutchcorn has done quite a bit of work on getting this working. I believe it's close.

@WildOsk
Copy link
Author

WildOsk commented Mar 16, 2024

Good to know it's close 🙌🏼

@crutchcorn
Copy link
Member

Apologies, closing as a dupe of #297

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

4 participants