41 Commits

Author SHA1 Message Date
Adam Reis
27f55721b7 4.0.0 (#74)
* Bump dependencies

* [feature] #38 Count number of matches

* Update make-replacements.js

* [feature] #42 Differentiate number of matches and number of replacements

* [enhance] #56 Support for CWD parameter

* Default config value

* [enhance] #63 Add --quiet flag to supress console output in CLI

* Update success-handler.js

* Update readme and add change log
2019-04-21 13:00:33 +12:00
Adam Reis
5d8e7eb6ba TOC 2018-08-28 12:28:49 +12:00
Adam Reis
261fd5d5eb Add some regex usage instructions 2018-08-28 12:27:59 +12:00
Adam Reis
0f6a4bc56e Add warning note about glob 2018-04-03 14:14:27 +12:00
Adam Reis
754fd80ff9 [enhance] Allow passing of glob config 2018-03-23 10:29:58 +13:00
Adam Reis
5e64df1c89 Tweaks to readme 2018-03-22 11:47:57 +13:00
CxRes
d94c3aaa49 Callback for from (#46)
* Callback for `from`

Added a callback for `from`, which takes file as an argument. Allows the user to tailor the search string according to the filename.

* Minor Changes to Callback for `from`

Additional comments to explain the callback forms.
Reversed minor version bump.

* Changes to documentation for `to` callback

Reverted to original `to` callback example.
Added a separate example example for using the `file` argument.
2018-03-22 11:42:23 +13:00
Adam Reis
015571ab22 Co founder notice 2018-03-16 07:40:46 +13:00
Adam Reis
60e7b82f61 Add verbose option 2018-03-07 08:41:45 +13:00
John
153dc27b05 Index added to the readme (#43) 2018-03-07 08:24:00 +13:00
Adam Reis
33dfe50c97 Document async/await usage 2018-02-21 15:36:57 +13:00
Adam Reis
310d37b2fc Fix CLI path resolving for absolute paths 2017-12-21 07:20:06 +13:00
Adam Reis
dc3ea7368e 3.0.0
- Drop deprecated API
- Drop support for Node 4 and 5
- Refactor and clean up code base
- Leverage destructuring
- Option to disable globs (#33)
- Update readme
2017-09-14 14:23:05 +12:00
Adam Reis
823cb1183f Explain usage of callbacks in readme 2017-09-04 15:18:40 +12:00
Adam Reis
dae627324e Update readme, fix line length 2017-08-25 07:34:56 +12:00
Kodie Grantham
508ad44b09 Added ignore option (#27)
Ability to ignore files, since Glob doesn't take negated globs anymore since version 4 or 5.
2017-08-25 07:28:43 +12:00
Adam Reis
42236ba44e Clarify usage for replacing multiple occurrences 2017-08-15 14:19:14 +12:00
Adam Reis
90c09ed1dd [fix] #22 Explicitly document return value 2017-06-22 09:31:11 +12:00
Adam Reis
faf15348ad Exit on regex error 2017-02-21 21:26:01 +13:00
Ryan Graham
fbc7de4772 Added support for passing Regex into CLI (#14)
* Added support for passing Regex into CLI

This will allow for passing the `from`/`to` parameters as regex in the format `\match\g` through the CLI. If pattern does not match a Regex it will fall back to passing through as a `String`.

* - Fixed style inconsistencies
- Added -isRegex parameter to explicitly state ‘from’ parameter is a regex
- Removed regex support from ‘to’ parameter

* Replaced -isRegex with —isRegex and moved to the end of the param list

* Added line and sample syntax for CLI in README
2017-02-21 21:23:34 +13:00
Adam Reis
89faa02639 Update readme 2017-02-13 18:35:45 +13:00
Adam Reis
f491d4e8d6 Update readme 2017-02-13 18:32:32 +13:00
Adam Reis
db4b760d9e CLI functionality 2017-02-13 18:29:46 +13:00
Adam Reis
ec82c43774 Default config, specify encoding, validate config 2017-01-25 13:02:21 +13:00
Adam Reis
d76f49080d Update readme 2017-01-19 10:20:04 +13:00
Adam Reis
cee2844886 Allow multiple replacements at once 2017-01-19 10:10:30 +13:00
Adam Reis
8da0e3a8ea Update name 2016-12-09 20:38:46 +13:00
Adam Buczynski
5f160fdcbb Update readme 2016-08-10 22:00:21 +12:00
Adam Buczynski
2fa9cb1a96 Prevent scroll in readme on npm 2016-08-10 21:58:56 +12:00
Adam Buczynski
83d53e732b Promise API, initial cut 2016-08-10 21:13:29 +12:00
RyanZim
e0492367b5 Add glob functionality & allowEmptyPaths option
files option can be passed as a glob

When allowEmptyPaths is true, replace-in-file will not throw an error
due to invalid file paths in `files`. Default is false.

Fixes #7
2016-08-09 09:29:00 -04:00
Adam Buczynski
6759960e10 Add sync replacement 2016-06-03 23:33:19 +12:00
Adam Buczynski
c2d15b81c9 Update readme 2016-02-17 17:02:22 +13:00
Adam Buczynski
e7a42d49f0 Add coverage badge 2016-02-16 16:52:47 +13:00
Adam Buczynski
cd1866c289 Add badges 2016-02-16 15:47:35 +13:00
Adam Buczynski
6538008507 Update readme and tests 2015-11-20 07:45:16 +13:00
Max Rittmüller
999c18e859 Provide example for callback 2015-11-19 17:57:15 +01:00
Adam Buczynski
f5532852b6 Update interface, split in two functions 2015-06-26 06:46:51 +12:00
Adam Buczynski
ee1d1db18c Add gitignore, move to lib 2015-06-25 20:42:53 +12:00
Adam Buczynski
2cf2864ef9 Fix readme 2015-06-25 15:53:45 +12:00
Adam Buczynski
bce5ccb3da Add readme 2015-06-25 15:48:43 +12:00