jk icon indicating copy to clipboard operation
jk copied to clipboard

Native Typescript support

Open dlespiau opened this issue 6 years ago • 4 comments

We could:

  • Detect the user wants to run a .ts file
  • Use https://www.npmjs.com/package/typescript to transpile it
  • Run it!

dlespiau avatar Dec 11 '18 09:12 dlespiau

We now have the stdlib described in ts and publish typings in @jkcfg/std

dlespiau avatar Dec 26 '18 23:12 dlespiau

@dlespiau @squaremo Could you add in one of the next releases native TypeScript support, as-in automatically running .ts files through a TypeScript compiler (maybe using ts-node)? I think it's fine to still require the user to install typescript locally or globally, but jkcfg should automatically run the compilation step instead of requiring the user to do this "out of process". I think this would largely increase the popularity of jk. I'm currently already using pulumi in yaml render-mode but jk could be a good lighter-weight alternative for cases where one really only wants to render yamls instead of deploying them right away.

geekflyer avatar Apr 04 '20 19:04 geekflyer

That's something I'd really like to see soon as well :) My current goal is to finish the plugin system so we can do interesting things such as rendering a helm chart, exposing its objects in js/ts and be able to manipulate them from a jk script.

Next goal will be the ts compiler if @squaremo doesn't beat me to it. It may take some time though as this project is a spare-time project for me.

dlespiau avatar Apr 05 '20 10:04 dlespiau

🤖Early morning research robot has brought you a gift! 🎁

https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API

squaremo avatar Apr 07 '20 07:04 squaremo