3

I'm playing with a small app that fetch data from Jira, generates metrics and serves it to a React front-end (https://github.com/fgerthoffert/jira-agile-velocity).

It currently contains:

  • a CLI, built with oclif (https://oclif.io/docs/introduction) to fetch and compute data
  • an API, built with Nest.js, to the data to the front-end
  • a UI, built with React + Typescript

For now, it grew organically to a point where I need to refactor and do an overall clean-up of the codebase.

I looked at NX (https://nx.dev/web) for the monorepo framework, it's super interesting as it would allow to share code between the apps (in particular type definitions and small utility functions).

I was able to get the API and UI set-up, it builds and runs properly, I can build docker images without any issues.

The challenge I'm having is around building the CLI app.

I suspect most of the customization should happen in the architect/build section of workspace.json, but I'm having some trouble understanding exactly how to configure this, in particular how to use the typescript builder (tsc -b).

I'd appreciate any pointers on how to call tsc -b.

The CLI codebase (without NX) is located here: https://github.com/Fgerthoffert/jira-agile-velocity/tree/master/cli

The NX portion is still standard, I generated the CLI folder using:

nx generate @nrwl/node:application jav-cli

Thanks a lot.

3
  • Hi Jared, it's more how to build a typescript project specifically with NX. Commented Nov 3, 2019 at 17:29
  • Did you find a way to use oclif in a nx workspace? Commented Aug 25, 2020 at 21:15
  • FYI, an issue has just been opened in the oclif GitHub repo RE: making it work easier with nx: github.com/oclif/oclif/issues/935 Commented Aug 5, 2022 at 5:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.