file-content-update

Change the contents of multiple files

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
file-content-update
001.0.23 years ago3 years agoMinified + gzip package size for file-content-update in KB

Readme

## file-content-update
Updates the content inside a file or multiple files at once with newer content while removing the old content.

Installation

``npm install file-content-update``

Functions

updateFiles(filespath, originalcontent, updatedcontent)

To update the content of files.
listFiles(filepath)
List the files in a particular directory.

Usage

const file_update = require('file-content-update');
file_update.updateFiles('public/**/*.html', '</body>', '<script src="./app.js"></script></body>')

Appends the script file to all the html files in the public folder.