Newer
Older
'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");
fs.copySync("node_modules/mermaid/dist/mermaid.min.js", destPath + "/mermaid.min.js");
// copy illustrated guide (not related to MkDocs, but still a part of the doc)
fs.copySync("docs/cassiopee_notice_illustree_fr.pdf", "src/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf");