mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
23
public/react/scripts/fileContentReplace.js
Normal file
23
public/react/scripts/fileContentReplace.js
Normal file
@@ -0,0 +1,23 @@
|
||||
var fs2 = require('fs');
|
||||
|
||||
function generateNewIndexJsp() {
|
||||
|
||||
var filePath = './build/index.html';
|
||||
|
||||
var outputPath = filePath
|
||||
fs2.readFile(filePath, 'utf8', function (err,data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
var result = data
|
||||
.replace('/js/create_kindeditor.js', '/react/build/js/create_kindeditor.js')
|
||||
.replace(/https:\/\/testeduplus2.educoder.net/g, '');
|
||||
// .replace(/http:\/\/testbdweb.educoder.net/g, '');
|
||||
|
||||
.replace('/css/css_min_all.css', '/react/build/css/css_min_all.css');
|
||||
|
||||
fs2.writeFile(outputPath, result, 'utf8', function (err) {
|
||||
if (err) return console.log(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user