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 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 powerful and easy-to-use documentation framework built for Next.js App Router. It provides a beautiful default theme, MDX support and flexible components to build your documentation site in minutes.
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
- See Our [Website](https://docstra.sudhucodes.com) for more documentation.
10
+ ### **Documentation & Guide**
10
11
 
11
- Thanks for using Docstra! Happy Documentation :)
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 package = require("../package.json");
4
- const command = process.argv[2];
3
+ const pkg = require("../package.json");
4
+ const { initDocstra } = require("./commands/init");
5
5
 
6
- if (command === "init") {
7
- console.log(`
8
- Docstra CLI ${package.version}
9
- ${package.description}
6
+ // --- CLI ENTRY ---
7
+ const command = process.argv[2];
10
8
 
11
- Thank you for trying the Docstra CLI.
12
- We are actively working on the \`init\` command and it will be
13
- available in an upcoming release.
9
+ switch (command) {
10
+ case "init":
11
+ initDocstra();
12
+ break;
14
13
 
15
- Stay tuned!
16
- `);
17
- } else {
14
+ default:
18
15
  console.log(`
19
- Usage:
20
- docstra init
16
+ Docstra CLI ${pkg.version}
21
17
 
22
- Description:
23
- Initializes Docstra in your project (coming soon).
18
+ Usage:
19
+ docstra init Initialize Docstra in your project
24
20
  `);
25
21
  }
@@ -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
- watcher.on("ready", () => {
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 = {