Lines 180-220javascript
180 const destPathFor = (sourcePath) => path3.join(destDir, path3.relative(docsSourceDir, sourcePath));
181 const isAsset = (sourcePath) => path3.relative(docsSourceDir, sourcePath).split(path3.sep)[0] === "assets";
182 const watcher = chokidar.watch(docsSourceDir, { ignoreInitial: true });
183 watcher.on("add", (sourcePath) => {
184 if (!isAsset(sourcePath)) fs2.cp(sourcePath, destPathFor(sourcePath));
186 watcher.on("change", (sourcePath) => {
187 if (!isAsset(sourcePath)) fs2.cp(sourcePath, destPathFor(sourcePath));
189 watcher.on("unlink", (sourcePath) => {
190 if (!isAsset(sourcePath)) fs2.rm(destPathFor(sourcePath), { force: true });
192 return () => watcher.close();
195// framework/config/load.ts
196import { createJiti } from "jiti";
197import path4 from "path";
198async function loadDocsConfig(projectRoot2) {
199 const configPath = path4.join(projectRoot2, "docs.config.ts");
200 const jiti = createJiti(import.meta.url);
201 return jiti.import(configPath, { default: true });
202}
MediumDynamic Require
Package source references dynamic require/import behavior.
dist-cli/cli.jsView on unpkg · L200 204// framework/config/resolve.ts
205import fs3 from "fs/promises";
206import path5 from "path";
207var SITE_DOMAIN = "https://docs.trickfirerobotics.com";
208var GITHUB_ORG = "TrickfireRobotics";
213 href: "https://www.notion.so/trickfire/invite/7f153eec8ed8ebe4608dc95892fce859540f8640"
215 { icon: "external", label: "TrickFire Robotics", href: SITE_DOMAIN }
217async function readProjectName(projectRoot2) {
218 const pkgPath = path5.join(projectRoot2, "package.json");
219 const raw = await fs3.readFile(pkgPath, "utf-8");
220 const pkg = JSON.parse(raw);