1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-04 15:58:01 +02:00
Files
BezierInfo-2/tools/copy-default-locale.js
Pomax 4ad072c7a2 Add a curvature section (#159)
* curvature and radius of curvature
2018-12-09 16:31:16 -08:00

15 lines
732 B
JavaScript

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');
fs.writeFileSync(path.join(BASEDIR, "index.html"), html);