Skip to content
This repository was archived by the owner on Feb 16, 2022. It is now read-only.

Latest commit

 

History

History
48 lines (35 loc) · 747 Bytes

README.md

File metadata and controls

48 lines (35 loc) · 747 Bytes

Autogit Plugin - Replace

A plugin for performing string replacements.

Install

npm install --save autogit-plugin-replace

Usage

Options

This plugin uses the following options object:

{
  paths: [], // Array of relative paths to the files that will be replaced
  replacements: [] // Array or arguments to pass to `String.prototype.replace`
}

Configuration

Add this plugin to a command:

const replace = require ( 'autogit-plugin-replace' );

module.exports = {
  commands: {
    'my-command': [
      replace ({
        paths: ['readme.md'],
        replacements: [
          [/pulgin/g, 'plugin'],
          [/foo/g, 'bar']
        ]
      })
    ]
  }
}

License

MIT © Fabio Spampinato