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.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by14.54%
Maintainers
1
Weekly downloads
 
Created
Source

Marmot (mrm)

Build Status npm

Command line tool to help you keep configuration (package.json, .gitignore, .eslintrc, etc.) of your open source projects in sync.

Features

  • Will not overwrite your data if you don’t want it to
  • Has tools to work with JSON, YAML, INI, Markdown and text files
  • Has bunch of customizable tasks
  • Easy to write your own tasks

Motivation

Most of the available tools are template based. Template approach 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 tasks
  • mrm <task> — run a task

(You need to create a configuration file first — see below.)

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

codecov

Adds Codecov to Travis CI config (see travis task) and Readme badge.

editorconfig

EditorConfig: adds .editorconfig.

Config options:

  • indent — indentation, tab or number of spaces (by default tab).

eslint

ESLint: adds .eslintrc, adds npm script and installs dependencies.

Config options:

  • eslintPreset — preset name (not npm package name, by default will install eslint:recommended preset)
  • eslintPeerDependencies — additional dependencies to install (e.g. ['prettier', 'eslint-plugin-prettier'])

gitignore

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

jest

Jest: adds npm scripts, updates .gitignore, .npmignore, .eslintignore with common patterns, installs dependencies. Tries to get rid of Mocha and AVA configs.

license

Adds license file based on license field in package.json.

Config options:

  • license — File name (by default License.md).

lintstaged

lint-staged: creates config in package.json, sets up pre-commit Git hook and installs dependencies.

package

Creates package.json.

readme

Creates Readme file.

Config options:

  • readme — Name of the readme file (by default Readme.md).

stylelint

Stylelint: adds .stylelintrc, adds npm script and installs dependencies.

Config options:

  • stylelintPreset — preset name (by default will install stylelint-config-standard preset)
  • stylelintExtensions — file extensions to lint (by default .css)

travis

Travis CI: creates .travis.yml and 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 your task will override an 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 list your dependencies there:

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

mrm-core is an utility library created to write Mrm tasks, it has function to work with common config files (JSON, YAML, INI, Markdown), npm dependencies, etc.

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

Change log

The change log 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.

Keywords

FAQs

Package last updated on 02 Jul 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