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

add --config (path) flag to CLI to support monorepos #919

Closed
NiklasBuchfink opened this issue Jun 13, 2023 · 6 comments
Closed

add --config (path) flag to CLI to support monorepos #919

NiklasBuchfink opened this issue Jun 13, 2023 · 6 comments
Assignees
Labels
type: feature New feature or request

Comments

@NiklasBuchfink
Copy link
Member

NiklasBuchfink commented Jun 13, 2023

Problem

Monorepos sometimes want to avoid introducing new dependencies inside of the root directory.

Would it be possible to avoid having the new package.json, package-lock.json, inlang.config.js in the root directory of the repository? It would be much better to have these in a subdirectory (ideally inside website/ if possible, or in a new subdirectory) for cleanliness and ease of code owner allocation.

See: LAION-AI/Open-Assistant#3393 (comment)

Proposal

To solve this problem relatively quickly, we can support only one inlang.config.js, find the subdirectory where it is located, and keep the required co-location of inlang.config.js and CLI. The challenge here is that this should work for all inlang apps.

Further information

At some point, monorepos will also request support for multiple applications.

@NiklasBuchfink
Copy link
Member Author

@inlang/team Let's discuss this

@samuelstroschein
Copy link
Member

samuelstroschein commented Jun 13, 2023

Duplicate of #258.

IMO not important because @NiklasBuchfink PR contains a mistake, see LAION-AI/Open-Assistant#3393 (comment). Should we close this for #258?

@samuelstroschein samuelstroschein changed the title Support for subdirectories in monorepos add --config (path) flag to CLI to support monorepos Jun 13, 2023
@samuelstroschein
Copy link
Member

Counter Proposal - Adding a --config flag to the CLI

The issue stems from the fact that the CLI might be installed in a path.

@NilsJacobsen
Copy link
Collaborator

Same here: tournesol-app/tournesol#1610

@felixhaeberle
Copy link
Contributor

Done by c67535d

@felixhaeberle
Copy link
Contributor

@inlang/team

🎉 The CLI now has a --config option where you can provide your path/to/inlang.config.js.
This makes working with the CLI in monorepos possible and easy!!

Usage

npx inlang lint --config path/to/inlang.config.js

More info in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
No open projects
Development

No branches or pull requests

4 participants