Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mrm

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mrm

Simplistic project dotfiles organizer

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30K
decreased by-9.99%
Maintainers
1
Weekly downloads
 
Created
Source

Marmot (mrm)

Build Status npm

Command line tool to help you keep dotfiles (.gitignore, .eslintrc, etc.) of all your open source project in sync.

Features

  • 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 tasks (see the list below)
  • Easy to write your own tasks

Motivation

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.

Installation

npm install -g mrm

Usage

  • mrm — Print list of task
  • mrm <task> — Run tasks

(You will need a configuration file first.)

Configuration

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"]
    }
}

Tasks

editorconfig

Adds .editorconfig.

eslint

Adds .eslintrc and .eslintignore, adds npm script and inistalls dependencies.

Config options:

  • eslintPreset — preset name (not npm package name, by default will instal eslint:recommended preset)

gitignore

Adds .gitignore with node_modules, logs and artifacts of popular code editors.

license

Adds MIT license file.

lintstaged

Adds lint-staged: creates .lintstagedrc, sets up pre-commit Git hook and inistalls dependencies.

package

Creates package.json and adds npm badge to Readme.

readme

Creates readme file.

travis

Creates .travis.ymland adds Travis CI badge to Readme.

Custom tasks

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 = 'Task description';

If your custom tasks have dependencies (such as mrm-core) you should initialize the mrm folder as an npm module, and set your dependencies there:

cd ~/.mrm
# or: cd ~/dotfiles/mrm
npm init -y
npm install --save mrm-core

See mrm-core library for useful functions for your tasks.

You can find some examples here or check code of internal tasks.

Changelog

The changelog can be found on the Releases page.

Contributing

Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.

Authors and license

Artem Sapegin and contributors.

MIT License, see the included License.md file.

FAQs

Package last updated on 28 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc