Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/fabiospampinato/autogit-plugin-replace
- Owner: fabiospampinato
- License: mit
- Archived: true
- Created: 2018-10-17T14:04:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-24T20:28:26.000Z (almost 5 years ago)
- Last Synced: 2024-07-23T23:01:16.524Z (3 months ago)
- Topics: autogit, plugin, replace, string
- Language: TypeScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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