Does anyone have any good tutorials about making a plugin? The plugin generator is cool, but I can’t seem to get past the finish line.
The idea is to take an openapi yaml file, and generate a typescript sdk from it.
I got it working with regard to generating the typescript, but when I go tot use it in an express app, I get
ENOENT: no such file or directory, open '.../libs/email-sdk/package.json
None of the other packages have package.json files, do I need to add some other build step somewhere? maybe from ts->js? It’s pretty easy to add the command, but where to I put the compiled files? Should I generate some kind of stub package.json?
I’ve tried looking through some other packages, but they are pretty hard to parse ericwooley/openapi-sdk
for context, i’m trying to use it in an express app
I am pretty busy tonight, but I’ll take a look at this in the morning!
|I actually discovered this from the <#CM4LG9SMR||announcements> channel: https://www.youtube.com/watch?v=J0PxtUXoDz8|
Hopefully that answers most my questions
I would highly recommend linking to that video in the plugin generator, it’s been super helpful so far
Reading the nx sources is great as an addition. I do that a lot to see how it’s done in the official packages
Agreed! That is how I learned up till now!
Yea, I spent some time reading the sources, but i’m 100% new to nx and the angular build tools (maybe i have no business building a plugin)
So the view from 30k feet was still eluding me.
The answer to the original question BTW: if you want to use your typescript library with
nx serve don’t include a build step.
The good news is, i think i pretty much got it, just doing some testing and documenting
Thanks for the info , I think that’s what I ended up doing. That repo is pretty much ready, I’m just testing it myself before I try anything like getting it listed.