evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.44k stars 167 forks source link

Evidence Monorepo Support #843

Open archiewood opened 1 year ago

archiewood commented 1 year ago

Ability to have multiple evidence projects that live inside one repo and have the dev experience run smoothly.

AlbinXXX commented 10 months ago

do you mind if I work on the following issue: I want to be able to run dev environment from the monorepo root folder and be able to run it all with one or two commands?

ItsMeBrianD commented 10 months ago

I think this issue is related to working on evidence projects (not the evidence monorepo itself) but if you want to take a stab at improving the dev experience in this repository we're always open to pull requests!

shakedlokits commented 3 months ago

This is what blocks us from using evidence. We have an Nx monorepo of our project and you can't run evidence in it. It breaks the CLI.

archiewood commented 3 months ago

What's your setup?

Can you npm --prefix ./my-evidence-folder run sources etc?

shakedlokits commented 3 months ago

Hey @archiewood It's an Nx monorepo. It has a directory called sites and I created a monorepo/sites/business-analysis directory for evidence.

This is what I get:

➜  npm --prefix ./sites/business-analysis run sources

> my-evidence-project@0.0.1 sources
> evidence sources

Could not find evidence plugins file. (Look at /Users/shakedlokits/Documents/Projects/monorepo/evidence.plugins.yaml)

It's looking in the wrong directory for the evidence.plugins.yaml file, even though I gave it a prefix.

archiewood commented 3 months ago

Which folder did you store your evidence.plugins.yaml in? Root or business-analysis?

shakedlokits commented 3 months ago

I stored it in monorepo/sites/business-analysis as it is unrelated to the other teams in the company.

shakedlokits commented 2 months ago

@archiewood any updates?

archiewood commented 2 months ago

Don't have a fix slated yet

in the meantime are you able to cd into the correct directory and run from there?

archiewood commented 2 months ago

Will also happily review PRs if this feature is important to you!

hughess commented 2 months ago

This may work if you use the VS Code extension's built-in commands. If you are in your monorepo root and click Start Evidence (or use Cmd/Ctrl + R) it should start evidence in the subfolder it's in