Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Add support for other directory structures? #8

Open
JamieMason opened this issue Jul 24, 2018 · 2 comments
Open

Add support for other directory structures? #8

JamieMason opened this issue Jul 24, 2018 · 2 comments

Comments

@JamieMason
Copy link

I'm really interested in lank but am working on a project with this structure. I'd like to be able to develop on consuming-app with the libraries from lerna-monorepo linked using lank.

├── consuming-app
└── lerna-monorepo
    └── packages
        ├── lib-1
        ├── lib-2
        └── lib-3

I think lank is currently set to work against this structure?

├── consuming-app
├── lib-1
├── lib-2
└── lib-3

It might be possible to add support for custom project locations without a breaking change if

const dir = path.join(util._cwd(), cfg.control.siblingPath, obj.module);
were to use path.resolve instead of path.join?

If the current config values of module names are present, then the current behaviour could be used with the siblingPath etc but if a relative or absolute path is set instead, then could that be used to locate the project to be linked? Some more refactoring would be needed of course than just a change to this line.

Please let me know if this idea seems worthwhile and aligns with the aims of the project and I'd be happy to help if needed. Feel free to disregard the suggested approach as I don't know this codebase well.

Thanks.

@ryan-roemer
Copy link
Member

Yep, lank currently just sets one NODE_PATH addition / infers one project root directory. We've had some other folks asking for multiple root support to better handle monorepos. I'm a bit crazy busy right now, but will try and get out the feature in the coming weeks...

@JamieMason
Copy link
Author

No rush at all Ryan, thanks for this great util. If I can help please let me know.

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

No branches or pull requests

2 participants