docstra 1.7.6 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -4
- package/cli/commands/init.js +149 -0
- package/cli/index.js +12 -16
- package/cli/templates/docstra-config.js +53 -0
- package/cli/templates/index.js +11 -0
- package/cli/templates/mdx-components.js +8 -0
- package/cli/templates/next-config.js +7 -0
- package/cli/templates/pages.js +63 -0
- package/cli/utils/fs.js +31 -0
- package/dist/server/index.js +3 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +3 -5
- package/dist/server/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/server/index.mjs
CHANGED
|
@@ -1809,7 +1809,6 @@ export const docs = [
|
|
|
1809
1809
|
];
|
|
1810
1810
|
`;
|
|
1811
1811
|
fs.writeFileSync(outFile, finalOutput, "utf8");
|
|
1812
|
-
logger.success(`MDX content compiled successfully`);
|
|
1813
1812
|
}
|
|
1814
1813
|
function getAllMdxFiles(dir) {
|
|
1815
1814
|
return fs.readdirSync(dir).flatMap((file) => {
|
|
@@ -1842,18 +1841,16 @@ async function runDocstraDev(contentDir) {
|
|
|
1842
1841
|
ignored: ["node_modules", ".next"]
|
|
1843
1842
|
});
|
|
1844
1843
|
watcher.add([contentDir, configFile]);
|
|
1845
|
-
|
|
1846
|
-
logger.info("Watching for changes...");
|
|
1847
|
-
});
|
|
1844
|
+
logger.info(`Dev server started...`);
|
|
1848
1845
|
watcher.on("all", async (_, file) => {
|
|
1849
1846
|
if (!file.endsWith(".md") && !file.endsWith(".mdx") && !file.endsWith("docstra.config.ts")) {
|
|
1850
1847
|
return;
|
|
1851
1848
|
}
|
|
1852
1849
|
if (rebuildTimeout) clearTimeout(rebuildTimeout);
|
|
1853
1850
|
rebuildTimeout = setTimeout(async () => {
|
|
1854
|
-
logger.info(`Rebuilding...`);
|
|
1855
1851
|
await runDocstraBuild(contentDir);
|
|
1856
1852
|
}, 200);
|
|
1853
|
+
logger.info(`MDX content rebuilt successfully`);
|
|
1857
1854
|
});
|
|
1858
1855
|
process.on("exit", () => {
|
|
1859
1856
|
if (!watcher.closed) {
|
|
@@ -1903,6 +1900,7 @@ function withDocstra(nextConfig = {}) {
|
|
|
1903
1900
|
}
|
|
1904
1901
|
if (isBuild) {
|
|
1905
1902
|
runDocstraBuild(contentDir);
|
|
1903
|
+
logger.info(`MDX content generated successfully`);
|
|
1906
1904
|
}
|
|
1907
1905
|
}
|
|
1908
1906
|
const turbopack = {
|