I'm looking to be able to read a source file, amend the contect within tags then output to a new file.
fs.readFile('testfile.js' , "UTF-8", function(error, code)
{
}
<< testfile.js >>
<html>
<head></head>
<script>
alert("test");
</script>
<body>...
I'm trying to find and replace the contect of the script tag, remembering the contect could be quite large and there could be multiple tags.
The code is to be run under node.js which is currently reading the file using var fs = require('fs-extra');