cubos / sdkgen

[ DEPRECATED, SEE https://github.com/sdkgen/sdkgen ] Tool that aims on solving client-server communication and data layout sharing between server, web, android and ios using a description language also called sdkgen.
MIT License
45 stars 9 forks source link

nodejs standalone target #11

Closed dygufa closed 6 years ago

dygufa commented 6 years ago

Nowadays there's no way to consume the API in a node application, we could fix that in a number of ways:

The problem with the first approach is the bundle size increment, in order to make the web target compatible we would need to polifyll some functions and that would increase the bundle size in about 30kb (that's a lot for the web and we're trying to reduce it, not increment it)

With that in mind I think we should stick with the last two options, but the sdkgen itself doesn't generate a npm package, It only generates the api.ts file (for the web target) that will be bundled into a npm package by another tool.

So, for now, I'm attacking the last option and creating a new node target that will output a standalone client for the api.

Besides that I'm also opening a new issue suggesting the sdkgen to return a npm package as output instead of a file to be bundled for a third tool.