From 1808fa039f686370ce8b3384767c7aaf8630d249 Mon Sep 17 00:00:00 2001 From: John carmichael Date: Mon, 5 Mar 2018 15:09:51 +0100 Subject: [PATCH 1/5] Test internal link for github --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4745080..356c7f6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,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. +# Index +[Installation](##Installation) + ## Installation ```shell # Using npm From 8d6f2a918badd0bffcac968a61125df7585562fc Mon Sep 17 00:00:00 2001 From: John carmichael Date: Mon, 5 Mar 2018 15:10:45 +0100 Subject: [PATCH 2/5] Single hash to a h2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 356c7f6..29f9d4f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ 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. # Index -[Installation](##Installation) +[Installation](#Installation) ## Installation ```shell From 297f9e0a70915c05db2121c5005896c53658d7d6 Mon Sep 17 00:00:00 2001 From: John carmichael Date: Mon, 5 Mar 2018 15:19:08 +0100 Subject: [PATCH 3/5] Full index --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29f9d4f..72568e7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,29 @@ 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. # Index -[Installation](#Installation) +- [Installation](#installation) +- [Basic usage](#basic-usage) + - [Asynchronous replacement with `async`/`await`](#asynchronous-replacement-with-asyncawait) + - [Asynchronous replacement with promises](asynchronous-replacement-with-promises) + - [Asynchronous replacement with callback](#asynchronous-replacement-with-callback) + - [Synchronous replacement](#synchronous-replacement) + - [Return value](#return-value) +- [Advanced usage](#advanced-usage) + - [Replace a single file or glob](#replace-a-single-file-or-glob) + - [Replace multiple files or globs](#replace-multiple-files-or-globs) + - [Replace first occurrence only](#replace-first-occurrence-only) + - [Replace all occurrences](#replace-all-occurrences) + - [Multiple values with the same replacement](#multiple-values-with-the-same-replacement) + - [Multiple values with different replacements](#multiple-values-with-different-replacements) + - [Using callbacks for `to`](#using-callbacks-for-to) + - [Ignore a single file or glob](#ignore-a-single-file-or-glob) + - [Ignore multiple files or globs](#ignore-multiple-files-or-globs) + - [Allow empty/invalid paths](#allow-emptyinvalid-paths) + - [Disable globs](#disable-globs) + - [Specify character encoding](#specify-character-encoding) +- [CLI usage](#cli-usage) +- [Version information](#version-information) +- [License](#license) ## Installation ```shell From fc36f86940610c768007bbb2a3208e47a245e89e Mon Sep 17 00:00:00 2001 From: John carmichael Date: Mon, 5 Mar 2018 15:26:03 +0100 Subject: [PATCH 4/5] Additional note to install globally --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72568e7..1fd0ce6 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,11 @@ A simple utility to quickly replace text in one or more files or globs. Works sy ## Installation ```shell -# Using npm -npm install replace-in-file +# Using npm, installing to local project +npm i --save replace-in-file + +# Using npm, installing globally +sudo npm i -g replace-in-file # Using yarn yarn add replace-in-file From 478b8221828d72089beaa11b4e8bed0507f084d2 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 6 Mar 2018 11:15:10 +0100 Subject: [PATCH 5/5] Removed sudo from the npm i -g --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fd0ce6..7529d5c 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ A simple utility to quickly replace text in one or more files or globs. Works sy # Using npm, installing to local project npm i --save replace-in-file -# Using npm, installing globally -sudo npm i -g replace-in-file +# Using npm, installing globally for global cli usage +npm i -g replace-in-file # Using yarn yarn add replace-in-file