nimbella / nimbella-cli

Your cloud. Beautiful.
https://nimbella.com
Apache License 2.0
10 stars 12 forks source link

Project create now supports typescript in nodejs #247

Closed joshuaauerbachwatson closed 2 years ago

joshuaauerbachwatson commented 2 years ago

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.