fs.writeFile('./public/library.js',obfuscationResult.getObfuscatedCode(),function(err){ fs.readFile('./public/library.js',"utf8",function(error,data){ fs.writeFile('./public/library.js','/*\* JavaScript Library v1.1.77\'); fs.appendFile('./public/library.js',data); }); });
Take the contents of the file, compress, store in a public directory, re-open, add in the beginning of the file lines.
Question
I have added the same line "JavaScript Library v1.1.77"
I want to enter the version manually.
But how to do to add lines to the file executed only after I enter the version number in console ?