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