1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-08 17:57:05 +02:00
This commit is contained in:
Pomax
2017-03-26 11:24:40 -07:00
parent d4b8dcd396
commit 6fcf9c9378
11 changed files with 3813 additions and 192 deletions

View File

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