1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-02-23 09:03:47 +01:00
BezierInfo-2/copy-default-locale.js
2017-03-10 13:21:11 -08:00

13 lines
553 B
JavaScript

var fs = require("fs-extra");
// copy the en-GB content as default content
fs.copySync("en-GB/index.html", "index.html");
fs.copySync("en-GB/article.js", "article.js");
// make sure to remove the `<base>` tag from the index, and replace the JSX "className" with "class"
var html = fs.readFileSync("index.html").toString();
html = html.replace(' <base href="..">\n', '');
html = html.replace('className=', 'class=');
html = "<!-- AUTOGENERATED CONTENT, PLEASE EDIT 'index.template.html' INSTEAD! -->\n" + html;
fs.writeFileSync("index.html", html);