npm.io
1.0.2 • Published 7 years ago

autogit-plugin-replace

Licence
MIT
Version
1.0.2
Deps
3
Size
14 kB
Vulns
0
Weekly
0
Stars
1

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

Keywords