prev-cli 0.24.7 → 0.24.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.
Files changed (2) hide show
  1. package/dist/cli.js +28 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -106,9 +106,30 @@ async function scanPages(rootDir, options = {}) {
106
106
  patterns.push(`${dir}/**/*.{md,mdx}`);
107
107
  }
108
108
  const ignore = [
109
- "node_modules/**",
110
- "dist/**",
111
- ".cache/**",
109
+ "**/node_modules/**",
110
+ "**/.worktrees/**",
111
+ "**/.claude/**",
112
+ "**/dist/**",
113
+ "**/.cache/**",
114
+ "**/.git/**",
115
+ "**/coverage/**",
116
+ "**/build/**",
117
+ "**/.next/**",
118
+ "**/.nuxt/**",
119
+ "**/.turbo/**",
120
+ "**/.vercel/**",
121
+ "**/.svelte-kit/**",
122
+ "**/vendor/**",
123
+ "**/target/**",
124
+ "apps/**",
125
+ "packages/**",
126
+ "services/**",
127
+ "libs/**",
128
+ "src/**",
129
+ "test/**",
130
+ "tests/**",
131
+ "__tests__/**",
132
+ "e2e/**",
112
133
  "CLAUDE.md",
113
134
  "CHANGELOG.md",
114
135
  "CONTRIBUTING.md",
@@ -139,8 +160,8 @@ async function scanPages(rootDir, options = {}) {
139
160
  routeMap.set(route, { file, priority });
140
161
  }
141
162
  }
142
- const pages = [];
143
- for (const { file } of routeMap.values()) {
163
+ const fileEntries = Array.from(routeMap.values());
164
+ const pages = await Promise.all(fileEntries.map(async ({ file }) => {
144
165
  const fullPath = path.join(rootDir, file);
145
166
  const rawContent = await readFile(fullPath, "utf-8");
146
167
  const { frontmatter, content } = parseFrontmatter(rawContent);
@@ -159,8 +180,8 @@ async function scanPages(rootDir, options = {}) {
159
180
  if (frontmatter.hidden === true) {
160
181
  page.hidden = true;
161
182
  }
162
- pages.push(page);
163
- }
183
+ return page;
184
+ }));
164
185
  return pages.sort((a, b) => a.route.localeCompare(b.route));
165
186
  }
166
187
  function extractTitle(content, file, frontmatter) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prev-cli",
3
- "version": "0.24.7",
3
+ "version": "0.24.8",
4
4
  "description": "Transform MDX directories into beautiful documentation websites",
5
5
  "type": "module",
6
6
  "license": "MIT",