Security News
Supply Chain Attack Detected in @solana/web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Command line tool to help you keep configuration (package.json
, .gitignore
, .eslintrc
, etc.) of your open source projects in sync.
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.
npm install -g mrm
Print a list available of tasks:
mrm
Run a task or an alias
mrm gitignore
mrm license
Run multiple tasks:
mrm gitignore license
Override config options (or run without a config file):
mrm license --config:name "Gandalf the Grey" --config:email "gandalf@middleearth.com" --config:url "http://middleearth.com"
Custom config and tasks folder:
mrm license --dir ~/unicorn
If you have npm 5.3 or newer you can use mrm without installation:
npx mrm
npx mrm gitignore
npx mrm license --config:name "Gandalf the Grey" --config:email "gandalf@middleearth.com" --config:url "http://middleearth.com"
Create ~/.mrm/config.json
or ~/dotfiles/mrm/config.json
:
{
"name": "Gandalf the Grey",
"email": "gandalf@middleearth.com",
"url": "http://middleearth.com",
"github": "gandalf",
"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"]
}
}
Config file isn’t required, you can also pass config options via command line.
Adds Codecov to Travis CI config (see travis task) and Readme badge.
EditorConfig: adds .editorconfig
.
Config options:
indent
— indentation, tab
or number of spaces (by default tab
).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']
)Adds .gitignore
with node_modules
, logs and artifacts of popular code editors.
Jest: adds npm scripts, updates .gitignore
, .npmignore
, .eslintignore
with common patterns, installs dependencies. Tries to get rid of Mocha and AVA configs.
Adds license file based on license
field in package.json
.
Config options:
license
— File name (by default License.md
).lint-staged: creates config in package.json
, sets up pre-commit Git hook and installs dependencies.
Creates package.json
.
Creates Readme file.
Config options:
readme
— Name of the readme file (by default Readme.md
).React Styleguidist: adds style guide config, adds npm scripts and installs dependencies.
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 CI: creates .travis.yml
and adds Travis CI badge to Readme.
TypeScript: adds tsconfig.json
and installs dependencies.
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, argv) {
config.require('name', 'email') // Mark config values as required
// config('name') - config value
// config('name', 'default value') - config value with a default value
// argv - command line arguments
};
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.
The change log 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.
FAQs
Codemods for your project config files
The npm package mrm receives a total of 22,697 weekly downloads. As such, mrm popularity was classified as popular.
We found that mrm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.