question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read configuration from project directory

See original GitHub issue

First introduce my use case:

My team develops a system in micro-service architecture which have several node.js projects. I’m trying to use mrm to unify configuration of all projects. I have defined a bunch of tasks according to our design guidelines. But not all configurations are common to all projects. Some configurations have to be set per-project. And also, some tasks should only be applied on part of projects.

I think if mrm would resolve configuration from .mrm file under project root directory, in which not only contains config items specific to current project but also defines which tasks from which preset should be applied, then I can run mrm without any argument inside each project to update its configuration according to latest version of preset/tasks published in our private npm registry.

It would be helpful for a big team to manage projects to keep them up-to-date with team’s project template/configuration.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sapegincommented, Nov 6, 2017

Would be nice if you could try to implement it. Maybe we could use cosmiconfig for that.

0reactions
aleungcommented, Oct 30, 2017

Yes, config option works. But it looks not the best way to me for reasons:

  • When there are more configure items the command line is long.
  • To automatic the workflow, I have to create a shell script to call mrm with a long list of arguments. Whenever a config needs to be updated, the script will be modified. Embedding config in a script is not good for maintainence.
  • Or I create a property file to store configs. My script read it then pass configs to mrm. But it adds complexity. It’d be ideal to handle inside mrm.

Would you consider to support merge config from files? If yes maybe I can contribute a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to access a configuration file located in one project from ...
Navigate to the project that contains your design factory class and run the ... The configuration builder should look like this instead.
Read more >
error reading configuration: open PROJECT: no such file or ...
So running operator-sdk version always tries to read the PROJECT file if there is one. And if it happens to be a directory...
Read more >
How to add an app.config file to a project - Microsoft Learn
This article describes how to store and retrieve custom information from an application configuration file by using Visual C#. How to: Read ......
Read more >
Configuration - The Cargo Book
It looks for configuration files in the current directory and all parent ... and /projects/foo/bar/baz/mybin/.cargo/config.toml , Cargo does not read those ...
Read more >
Project Configuration - Nx
json files are located in each project's folder. Nx merges the two files to get each project's configuration. The following configuration creates build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found