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

Project create now supports typescript in nodejs #247

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

joshuaauerbachwatson
Copy link
Contributor

@joshuaauerbachwatson joshuaauerbachwatson commented Aug 31, 2022

This change provides a more realistic way to support typescript in the nodejs runtime, rather than assuming there is a
specialized typescript runtime.

When you specify nim project create ... --language typescript the runtime kind is set to nodejs but the project is set up with additional material (package.json, tsconfig.json, .include, and src and lib folders) so that a simple action written in typescript will run. It should be easy to generalize this by adding source files, or adding dependencies, modifying generated .include accordingly.

Generalizing to multiple actions with shared material should also be easy but will need more validation and may result in some further changes. The basic structure can be relocated to lib and then the multiple source files are organized as needed under lib/src. The entire build runs under lib and then the individual actions consist only of .include files to tailer what goes into each action. The individual actions can also have a package.json (or not) for establishing the main function.

This is a more realistic way to support typescript than using a
specialized typescript library.  Version now 4.2.3,
@joshuaauerbachwatson joshuaauerbachwatson merged commit 8bcb462 into master Sep 2, 2022
@joshuaauerbachwatson joshuaauerbachwatson deleted the typescript branch September 2, 2022 17:35
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.

2 participants