1.0.0 • Published 10 years ago
replacefile v1.0.0
replacefile
Find and replace text in a file.
Installation
Install replacefile by running:
$ npm install --save replacefileDocumentation
replacefile.replace(file, regex, replacement) ⇒ Promise
Kind: static method of replacefile
Summary: Replace the contents of a file
Access: public
| Param | Type | Description |
|---|---|---|
| file | String | file path |
| regex | RegExp | regex |
| replacement | String | replacement |
Example
replacefile.replace('foo/bar/config.txt', /^GPUMEM.*$/g, 'GPUMEM=128')Support
If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.
Tests
Run the test suite by doing:
$ gulp testContribute
- Issue Tracker: github.com/jviotti/replacefile/issues
- Source Code: github.com/jviotti/replacefile
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:
$ gulp lintLicense
The project is licensed under the MIT license.
1.0.0
10 years ago
