Lines 152-192javascript
152 const destPathFor = (sourcePath) => path3.join(destDir, path3.relative(docsSourceDir, sourcePath));
153 const isAsset = (sourcePath) => path3.relative(docsSourceDir, sourcePath).split(path3.sep)[0] === "assets";
154 const watcher = chokidar.watch(docsSourceDir, { ignoreInitial: true });
155 watcher.on("add", (sourcePath) => {
156 if (!isAsset(sourcePath)) fs2.cp(sourcePath, destPathFor(sourcePath));
158 watcher.on("change", (sourcePath) => {
159 if (!isAsset(sourcePath)) fs2.cp(sourcePath, destPathFor(sourcePath));
161 watcher.on("unlink", (sourcePath) => {
162 if (!isAsset(sourcePath)) fs2.rm(destPathFor(sourcePath), { force: true });
164 return () => watcher.close();
167// framework/config/load.ts
168import { createJiti } from "jiti";
169import path4 from "path";
170async function loadDocsConfig(projectRoot2) {
171 const configPath = path4.join(projectRoot2, "docs.config.ts");
172 const jiti = createJiti(import.meta.url);
173 return jiti.import(configPath, { default: true });
174}
MediumDynamic Require
Package source references dynamic require/import behavior.
dist-cli/cli.jsView on unpkg · L172 176// framework/config/resolve.ts
177import fs3 from "fs/promises";
178import path5 from "path";
179var SITE_DOMAIN = "https://docs.trickfirerobotics.com";
180var GITHUB_ORG = "TrickfireRobotics";
185 href: "https://www.notion.so/trickfire/invite/7f153eec8ed8ebe4608dc95892fce859540f8640"
187 { icon: "external", label: "TrickFire Robotics", href: SITE_DOMAIN }
189async function readProjectName(projectRoot2) {
190 const pkgPath = path5.join(projectRoot2, "package.json");
191 const raw = await fs3.readFile(pkgPath, "utf-8");
192 const pkg = JSON.parse(raw);