Newer
Older
'use strict';
/**
* copies Mathjax to src/assets/docs/javascripts after doc was built by MkDocs
*/
const fs = require('fs-extra');
const destPath = "src/assets/docs/javascripts/mathjax";
// empty destination folder
fs.emptyDirSync(destPath);
// create destination subfolders
fs.ensureDirSync(destPath + "/fonts/HTML-CSS/TeX/", { recursive: true });
// copy required files only
fs.copySync("node_modules/mathjax/MathJax.js", destPath + "/MathJax.js");
fs.copySync("node_modules/mathjax/config", destPath + "/config");
fs.copySync("node_modules/mathjax/jax", destPath + "/jax");
fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/woff", destPath + "/fonts/HTML-CSS/TeX/woff");
fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/otf", destPath + "/fonts/HTML-CSS/TeX/otf");