Command line tool to help you keep dotfiles (.gitignore
, .eslintrc
, etc.) of all your open source project in sync.
- Will not overwrite your date if you don’t want
- Has tools to work with JSON, YAML, INI, Markdown and text files
- Has bunch customizable taks (see the list below)
- Easy to write your own tasks
Most of the available tools are template based. It works moderately well for new project generation but doesn’t work well for updating. Marmot’s approach is closer to codemods than templates.
npm install -g mrm
mrm
— Print list of taskmrm <task>
— Run taks
Create ~/.mrm/config.json
or ~/dotfiles/mrm/config.json
:
{
"name": "Tobias Müller",
"email": "tobias2000@gmail.com",
"url": "http://tobias2000.io",
"github": "tobias2000",
"indent": "tab", // "tab" or number of spaces
"readme", "Readme.md", // Name of readme file
"license", "License.md", // Name of license file
"aliases": { // Aliases to run multiple tasks at once
"node": ["license", "readme", "package", "editorconfig", "eslint", "gitignore"]
}
}
Adds .editorconfig
.
Adds .eslintrc
and .eslintignore
, adds npm script and inistalls dependencies.
Config options:
eslintPreset
— preset name (not npm package name, by default will instaleslint:recommended
preset)
Adds .gitignore
with node_modules
, logs and artifacts of popular code editors.
Adds MIT license file.
Adds lint-staged: creates .lintstagedrc
, sets up pre-commit Git hook and inistalls dependencies.
Creates package.json
and adds npm badge to Readme.
Creates readme file.
Creates .travis.yml
and adds Travis CI badge to Readme.
Create either ~/.mrm/<taskname>/index.js
or ~/dotfiles/mrm/<taskname>/index.js
. If <taskname>
is the same as one of the internal tasks, then your task will override internal one:
const { /* ... */ } = require('mrm-core');
module.exports = function(config) {
// config('name', 'default value') - config value
// config() - all config values
};
module.exports.description = 'Taks description';
See mrm-core library for useful functions for your tasks.
You can find some examples here or check code of internal tasks.
The changelog can be found on the Releases page.
Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.
Artem Sapegin and contributors.
MIT License, see the included License.md file.