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

Typescript support for External Source Plugins #1296

Open
lschierer opened this issue Nov 4, 2024 · 1 comment
Open

Typescript support for External Source Plugins #1296

lschierer opened this issue Nov 4, 2024 · 1 comment
Labels
feature New feature or request website Tasks related to the projects website / documentation

Comments

@lschierer
Copy link
Contributor

Type of Change

New Feature

Summary

Please support using TypeScript to write an External Source Plugin

Details

I attempted to follow https://www.greenwoodjs.io/plugins/source/ changing the .js extension out for .ts and get an ERR_UNKNOWN_FILE_EXTENSION that persists even after I was assisted in solving these errors for other sections of my configuration here.

I suspect that its actually possible to do this, but that it would be (currently) a multi-step process, where I'd need to transpile the plugin to javascript to then be able to run the greenwood develop or build commands. This request is to support, and document, a configuration that will consolidate that into a single command line that could be included as the develop script in a package.json file.

I further suspect that this is related to #1250 where in the comments I requested support for the main configuration file to be supported as a typescript file. My intuition is that if you solved that, this would be mostly solved as well.

@thescientist13
Copy link
Member

I further suspect that this is related to #1250 where in the comments I requested support for the main configuration file to be supported as a typescript file. My intuition is that if you solved that, this would be mostly solved as well.

Yeah, pretty much. Right now the TypeScript plugin is only geared towards transforming "web" code, e.g. anything in your src/ directory, but not really anything else.

Let me align this with #1250 though since I think this would be something we would apply to all plugins at large. My guess is that this would likely try and tackle this in two phases:

  1. Support exposing JS Docs style types (typing support for public capabilities of Greenwood #1250)
  2. Have Greenwood support TypeScript files first party for its APIs (would probably re-purpose this issue for that effort)

I've also been experimenting with Bun and Deno and they are working pretty well out of the box with some Greenwood demo apps as part of initial testing, and so now with NodeJS also supporting TS, I may even considering moving TS support right into Greenwood itself, probably with a flag though. We shall see!

@thescientist13 thescientist13 added website Tasks related to the projects website / documentation feature New feature or request labels Nov 5, 2024
lschierer pushed a commit to lschierer/EvonyTKRTips that referenced this issue Jan 28, 2025
this will be the right solution after ProjectEvergreen/greenwood#1296
is closed out and solved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request website Tasks related to the projects website / documentation
Projects
Development

No branches or pull requests

2 participants