MCPcopy Create free account
hub / github.com/Automattic/mongoose / pugifyAllFiles

Function pugifyAllFiles

scripts/website.js:535–546  ·  view source on GitHub ↗

* Render all files at once * @param {Boolean} noWatch Set whether to start file watchers for reload * @param {Boolean} isReload Indicate this is a reload of all files

(noWatch, isReload = false)

Source from the content-addressed store, hash-verified

533 * @param {Boolean} isReload Indicate this is a reload of all files
534 */
535async function pugifyAllFiles(noWatch, isReload = false) {
536 await Promise.all(files.map(async (file) => {
537 const filename = path.join(cwd, file);
538 await pugify(filename, docsFilemap.fileMap[file], isReload);
539 }));
540
541 // enable watch after all files have been done once, and not in the loop to use less-code
542 // only enable watch if main module AND having argument "--watch"
543 if (!noWatch && isMain && process.argv[2] === '--watch') {
544 startWatch();
545 }
546}
547
548/** Set which static paths to fully copy over to versioned docs */
549const pathsToCopy = [

Callers 2

startWatchFunction · 0.85
website.jsFile · 0.85

Calls 2

pugifyFunction · 0.85
startWatchFunction · 0.85

Tested by

no test coverage detected