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

tsdx builds in inter-dependent mono repo(lerna) #531

Closed
simbathesailor opened this issue Mar 3, 2020 · 4 comments
Closed

tsdx builds in inter-dependent mono repo(lerna) #531

simbathesailor opened this issue Mar 3, 2020 · 4 comments
Labels
kind: support Asking for support with something or a specific use case problem: stale Issue has not been responded to in some time scope: integration Related to an integration, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos

Comments

@simbathesailor
Copy link

simbathesailor commented Mar 3, 2020

Description

I have a mono repo. The repo location is https://github.com/simbathesailor/kalakari. It has three tsdx repos :

  1. components
  2. hooks
  3. utilities

Now utilities have to be compiled before hooks compilation, hooks have to be compiled before components compilation and in the end, components should be compiled.

Why there is this kind of need?
All three packages are referencing each other. hooks may refer utilities so it is essential to compile utilities first before hooks to avoid a compilation error.

hooks repository

import {getName} from "@kalakari/utilities"

components repository

function getName() {
  return "tsdx"
}
export {getName}

components repository should get compiled first and then hooks repository

I am using lerna for the mono repo. How can I run a command which looks for changes in these repositories and rebuild them in the following order:
utilities --> hooks ---> components.

Does tsdx support this kind of requirement?
Can we do something using concurrently ?

@agilgur5
Copy link
Collaborator

agilgur5 commented Mar 4, 2020

Related to #122

@simbathesailor
Copy link
Author

@agilgur5 This issue relates to #122 but, in my case there is compilation order which is a must. That's why the issue you mentioned will not help me much. Thanks for pointing out the related link.

@stevesims
Copy link

lerna will deal with building things in an appropriate order for you

as your hooks package has a dependency on your utilities package, you should put that dependency in the hooks package.json file. when you have your dependencies mapped out properly in the respective package.json files, lerna will build a dependency graph when you try to run a build, and ensure that the correct packages get build first

@agilgur5 agilgur5 added problem: stale Issue has not been responded to in some time kind: support Asking for support with something or a specific use case labels Mar 13, 2020
@agilgur5
Copy link
Collaborator

Gonna close this out in light of @stevesims 's comments. Thanks for chiming in!

Can re-open if this isn't resolved

@agilgur5 agilgur5 added scope: integration Related to an integration, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos labels Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: support Asking for support with something or a specific use case problem: stale Issue has not been responded to in some time scope: integration Related to an integration, not necessarily to core (but could influence core) topic: monorepo Related to Lerna monorepos
Projects
None yet
Development

No branches or pull requests

3 participants