Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabiospampinato/autogit-plugin-replace

A plugin for performing string replacements.
https://github.com/fabiospampinato/autogit-plugin-replace

autogit plugin replace string

Last synced: 3 months ago
JSON representation

A plugin for performing string replacements.

Awesome Lists containing this project

README

        

# Autogit Plugin - Replace

A plugin for performing string replacements.

## Install

```sh
npm install --save autogit-plugin-replace
```

## Usage

#### Options

This plugin uses the following options object:

```js
{
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:

```js
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