1.0.2 • Published 5 years ago
autogit-plugin-replace v1.0.2
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