1.0.0 • Published 9 years ago

replacefile v1.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
9 years ago

replacefile

npm version dependencies Build Status Build status

Find and replace text in a file.

Installation

Install replacefile by running:

$ npm install --save replacefile

Documentation

replacefile.replace(file, regex, replacement) ⇒ Promise

Kind: static method of replacefile
Summary: Replace the contents of a file
Access: public

ParamTypeDescription
fileStringfile path
regexRegExpregex
replacementStringreplacement

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 test

Contribute

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

$ gulp lint

License

The project is licensed under the MIT license.