Skip to content

User-configurable default preset#186

Open
ext wants to merge 2 commits into
sapegin:masterfrom
ext:feature/default-preset
Open

User-configurable default preset#186
ext wants to merge 2 commits into
sapegin:masterfrom
ext:feature/default-preset

Conversation

@ext

@ext ext commented Jul 8, 2021

Copy link
Copy Markdown
Collaborator

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

@sapegin sapegin left a comment

Copy link
Copy Markdown
Owner

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.

Comment thread packages/mrm/bin/mrm.js Outdated
Comment thread packages/mrm/src/index.js Outdated
@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
Copy Markdown

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%> (ø)

@sapegin sapegin left a comment

Copy link
Copy Markdown
Owner

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.

Comment thread docs/Making_presets.md Outdated

## Default preset

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

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread packages/mrm/bin/mrm.js Outdated
@ext ext force-pushed the feature/default-preset branch from d214805 to c5d6f04 Compare September 9, 2021 16:47
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