docstra 1.7.6 → 1.7.8
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/index.js +12 -16
- 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 +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
# Docstra
|
|
1
|
+
# **Docstra**
|
|
2
2
|
|
|
3
3
|
**The Modern Documentation Framework for Next.js**
|
|
4
4
|
|
|
5
|
-
Docstra is a
|
|
5
|
+
Docstra is a fast, flexible, and beautifully designed documentation framework built specifically for the **Next.js App Router**.
|
|
6
|
+
With first-class **MDX support**, a clean UI, and powerful components, you can build production-ready documentation sites in just minutes.
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
### **Documentation & Guide**
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Visit the official website for full guides, examples and API references:
|
|
13
|
+
|
|
14
|
+
👉 **[https://docstra.sudhucodes.com](https://docstra.sudhucodes.com)**
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
### **Thank You**
|
|
19
|
+
|
|
20
|
+
Thanks for choosing Docstra!
|
|
21
|
+
Happy documenting — and build something great.
|
package/cli/index.js
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const pkg = require("../package.json");
|
|
4
|
+
const { initDocstra } = require("./commands/init");
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Docstra CLI ${package.version}
|
|
9
|
-
${package.description}
|
|
6
|
+
// --- CLI ENTRY ---
|
|
7
|
+
const command = process.argv[2];
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
switch (command) {
|
|
10
|
+
case "init":
|
|
11
|
+
initDocstra();
|
|
12
|
+
break;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
`);
|
|
17
|
-
} else {
|
|
14
|
+
default:
|
|
18
15
|
console.log(`
|
|
19
|
-
|
|
20
|
-
docstra init
|
|
16
|
+
Docstra CLI ${pkg.version}
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
Usage:
|
|
19
|
+
docstra init Initialize Docstra in your project
|
|
24
20
|
`);
|
|
25
21
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -1836,7 +1836,6 @@ export const docs = [
|
|
|
1836
1836
|
];
|
|
1837
1837
|
`;
|
|
1838
1838
|
import_fs.default.writeFileSync(outFile, finalOutput, "utf8");
|
|
1839
|
-
logger.success(`MDX content compiled successfully`);
|
|
1840
1839
|
}
|
|
1841
1840
|
function getAllMdxFiles(dir) {
|
|
1842
1841
|
return import_fs.default.readdirSync(dir).flatMap((file) => {
|
|
@@ -1869,18 +1868,16 @@ async function runDocstraDev(contentDir) {
|
|
|
1869
1868
|
ignored: ["node_modules", ".next"]
|
|
1870
1869
|
});
|
|
1871
1870
|
watcher.add([contentDir, configFile]);
|
|
1872
|
-
|
|
1873
|
-
logger.info("Watching for changes...");
|
|
1874
|
-
});
|
|
1871
|
+
logger.info(`Dev server started...`);
|
|
1875
1872
|
watcher.on("all", async (_, file) => {
|
|
1876
1873
|
if (!file.endsWith(".md") && !file.endsWith(".mdx") && !file.endsWith("docstra.config.ts")) {
|
|
1877
1874
|
return;
|
|
1878
1875
|
}
|
|
1879
1876
|
if (rebuildTimeout) clearTimeout(rebuildTimeout);
|
|
1880
1877
|
rebuildTimeout = setTimeout(async () => {
|
|
1881
|
-
logger.info(`Rebuilding...`);
|
|
1882
1878
|
await runDocstraBuild(contentDir);
|
|
1883
1879
|
}, 200);
|
|
1880
|
+
logger.info(`MDX content rebuilt successfully`);
|
|
1884
1881
|
});
|
|
1885
1882
|
process.on("exit", () => {
|
|
1886
1883
|
if (!watcher.closed) {
|
|
@@ -1930,6 +1927,7 @@ function withDocstra(nextConfig = {}) {
|
|
|
1930
1927
|
}
|
|
1931
1928
|
if (isBuild) {
|
|
1932
1929
|
runDocstraBuild(contentDir);
|
|
1930
|
+
logger.info(`MDX content generated successfully`);
|
|
1933
1931
|
}
|
|
1934
1932
|
}
|
|
1935
1933
|
const turbopack = {
|