|
8 | 8 |
|
9 | 9 | A simple utility to quickly replace text in one or more files or globs. Works synchronously or asynchronously with either promises or callbacks. Make a single replacement or multiple replacements at once. |
10 | 10 |
|
| 11 | +# Index |
| 12 | +- [Installation](#installation) |
| 13 | +- [Basic usage](#basic-usage) |
| 14 | + - [Asynchronous replacement with `async`/`await`](#asynchronous-replacement-with-asyncawait) |
| 15 | + - [Asynchronous replacement with promises](asynchronous-replacement-with-promises) |
| 16 | + - [Asynchronous replacement with callback](#asynchronous-replacement-with-callback) |
| 17 | + - [Synchronous replacement](#synchronous-replacement) |
| 18 | + - [Return value](#return-value) |
| 19 | +- [Advanced usage](#advanced-usage) |
| 20 | + - [Replace a single file or glob](#replace-a-single-file-or-glob) |
| 21 | + - [Replace multiple files or globs](#replace-multiple-files-or-globs) |
| 22 | + - [Replace first occurrence only](#replace-first-occurrence-only) |
| 23 | + - [Replace all occurrences](#replace-all-occurrences) |
| 24 | + - [Multiple values with the same replacement](#multiple-values-with-the-same-replacement) |
| 25 | + - [Multiple values with different replacements](#multiple-values-with-different-replacements) |
| 26 | + - [Using callbacks for `to`](#using-callbacks-for-to) |
| 27 | + - [Ignore a single file or glob](#ignore-a-single-file-or-glob) |
| 28 | + - [Ignore multiple files or globs](#ignore-multiple-files-or-globs) |
| 29 | + - [Allow empty/invalid paths](#allow-emptyinvalid-paths) |
| 30 | + - [Disable globs](#disable-globs) |
| 31 | + - [Specify character encoding](#specify-character-encoding) |
| 32 | +- [CLI usage](#cli-usage) |
| 33 | +- [Version information](#version-information) |
| 34 | +- [License](#license) |
| 35 | + |
11 | 36 | ## Installation |
12 | 37 | ```shell |
13 | | -# Using npm |
14 | | -npm install replace-in-file |
| 38 | +# Using npm, installing to local project |
| 39 | +npm i --save replace-in-file |
| 40 | + |
| 41 | +# Using npm, installing globally for global cli usage |
| 42 | +npm i -g replace-in-file |
15 | 43 |
|
16 | 44 | # Using yarn |
17 | 45 | yarn add replace-in-file |
|
0 commit comments