Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Enabling tide-mode workflow with TS *monorepo* (React) #472

Open
david-alvarez-rosa opened this issue Nov 20, 2023 · 2 comments
Open

Comments

@david-alvarez-rosa
Copy link

Hi Emacs wizards -- wanted to ask about how can work in a monorepo, were multiple teams have each their own package (repo).

Let pkg-1, ..., pkg-n be the packages corresponding to team-1, ..., team-n, respectively.

At compile-time, those directories are (symbolically) linked to pkg-main

pkg-main/
    .gitignore
    tsconfig.json
    packages/
        pkg-1 -> ../pkg-1
        ...
        pkg-n -> ../pkg-n
 pkg-1/
    .gitignore
 ...
 pkg-n/
    .gitignore

Any tips on how can this be handled by tide-mode?

--

PS Why not enabling repo sponsorship? I'd be happy to contribute :)

@ananthakumaran
Copy link
Owner

ananthakumaran commented Nov 20, 2023

When you open any .ts file, tide walks up the directory till it finds a directory with tsconfig.json file and it will start tsserver with that directory as the project root. https://github.com/ananthakumaran/tide/blob/master/tide.el#L323 You can override the logic by setting the tide-project-root buffer local variable. I am not sure whether you want tide to work at individual project level or whole repo level. Individual project level is usually straightforward, just need to have a tsconfig.json at the project root directory.

@david-alvarez-rosa
Copy link
Author

Thanks @ananthakumaran —- unfortunately for me this doesn't really work as expected with projectile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants