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

User-configurable default preset #186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ext
Copy link
Collaborator

@ext ext commented Jul 8, 2021

Allows users to specify their own custom default preset.

In my opinion the strength of mrm is not the default tasks but the ability to create your own presets and tasks to setup applications and repositories. The default tasks interferes, uses the wrong configuration and is in general incomplete for my purposes. The major issue is that with an organization or company you want more control over the configuration.

By setting my own default preset it is easier to ensure that npx mrm eslint will setup eslint my way. Actively entering --preset @mycompany/unicorn is tedious when you want to run it across multiple repositories or when you want to run multiple tasks sequentially (i.e. task, commit, task, commit).

I do recognize that it might be a bit of documentation issue since npx mrm mytask might to different things on different machines but I hope the changes to output makes it more clear:

Running mytask (from preset "@mycompany/unicorn")...

@ext ext changed the title Feature/default preset User-configurable default preset Jul 8, 2021
Copy link
Owner

@sapegin sapegin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is a good feature! I've left a couple of minor comments.

packages/mrm/bin/mrm.js Outdated Show resolved Hide resolved
packages/mrm/src/index.js Outdated Show resolved Hide resolved
@ext ext force-pushed the feature/default-preset branch 2 times, most recently from 3971938 to 40b32b0 Compare August 16, 2021 20:51
@codecov-commenter
Copy link

Codecov Report

Merging #186 (40b32b0) into master (882f9e6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
packages/mrm/src/index.js 100.00% <100.00%> (ø)

Copy link
Owner

@sapegin sapegin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now, thanks! I have two minor comments. For the future, we should get rid of any mentions of the default preset in the code since there's no such thing anymore.


## Default preset

The default preset is `mrm-preset-default`, you can set a custom default preset in `.mrm/config.json`:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer true, mrm-preset-default is deprecated and tasks are autoinstalled by default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the documentation, let me know if you want additional changes

packages/mrm/bin/mrm.js Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

3 participants