Jordan-Hall / nx-bun

https://jordan-hall.github.io/nx-bun/
Other
58 stars 6 forks source link

feat(nx-bun,example-app): buildTarget option for run executor #2

Closed marcus-sa closed 9 months ago

marcus-sa commented 10 months ago

I've only tested it with Node as the runtime for Nx.

The reason for adding a task queue is if we want to add support for https://nx.dev/packages/js/executors/node#runbuildtargetdependencies in the future.

Heavily inspired by the @nx/js:node executor.

Jordan-Hall commented 10 months ago

I'm waiting to get #5 in first before this. This looks great, will add the optional support. However, will bring in nx/js and put this plugin more inline with @nx/js:node which is what this will then finish off that integration.

Jordan-Hall commented 9 months ago

@marcus-sa I've gone and rebase the repo with the changes I've done from #5. Build target was right based on the angle of moving it to same standard as node.

Just a few things, I dont mind picking it up myself if needed.

Can you please write migration script for the changes related to the run executor. 0.2.0 onwards now require migrations (sorry hence i said I can do it)

Also the example you use the TSC for compiling. This is good for a general example but do you mind adding a pure BUN solution please.

I've not looked myself but instead of cloning some of this logic any chance we can just import via @nx/js or @nx/node library so we not go all the overhead?

marcus-sa commented 9 months ago

@marcus-sa I've gone and rebase the repo with the changes I've done from #5. Build target was right based on the angle of moving it to same standard as node.

Nice 👍🏼

Can you please write migration script for the changes related to the run executor. 0.2.0 onwards now require migrations (sorry hence i said I can do it)

I'd prefer not to. Can you do it? 😄

Also the example you use the TSC for compiling. This is good for a general example but do you mind adding a pure BUN solution please.

Sure

I've not looked myself but instead of cloning some of this logic any chance we can just import via @nx/js or @nx/node library so we not go all the overhead?

Unfortunately, they're not exporting any of the logic so it has to be copy/pasted.

Jordan-Hall commented 9 months ago

Thank you, I'll sort the migration out its not a problem :) Thank you so much for this.

Jordan-Hall commented 9 months ago

I've added the additional project and it appears to be working on. Just some manual testing as an actual package end2end and then it should be ok to merge.

Thank you

Jordan-Hall commented 9 months ago

testing failed.

ws.relativeCwd is not a function when using readTargetOptions

Jordan-Hall commented 9 months ago

Requires the latest version of nx