@sp-days-framework/docusaurus-plugin-slidev 1.0.0
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/LICENSE +21 -0
- package/README.md +286 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/lib/plugin/builder.d.ts +31 -0
- package/lib/plugin/builder.d.ts.map +1 -0
- package/lib/plugin/builder.js +421 -0
- package/lib/plugin/builder.js.map +1 -0
- package/lib/plugin/index.d.ts +18 -0
- package/lib/plugin/index.d.ts.map +1 -0
- package/lib/plugin/index.js +148 -0
- package/lib/plugin/index.js.map +1 -0
- package/lib/plugin/scanner.d.ts +12 -0
- package/lib/plugin/scanner.d.ts.map +1 -0
- package/lib/plugin/scanner.js +119 -0
- package/lib/plugin/scanner.js.map +1 -0
- package/lib/theme/SlidevCard/index.d.ts +12 -0
- package/lib/theme/SlidevCard/index.d.ts.map +1 -0
- package/lib/theme/SlidevCard/index.js +74 -0
- package/lib/theme/SlidevCard/index.js.map +1 -0
- package/lib/theme/SlidevCard/styles.module.css +206 -0
- package/lib/theme/SlidevOverview/index.d.ts +6 -0
- package/lib/theme/SlidevOverview/index.d.ts.map +1 -0
- package/lib/theme/SlidevOverview/index.js +165 -0
- package/lib/theme/SlidevOverview/index.js.map +1 -0
- package/lib/theme/SlidevOverview/styles.module.css +283 -0
- package/lib/theme/SlidevPresentation/index.d.ts +6 -0
- package/lib/theme/SlidevPresentation/index.d.ts.map +1 -0
- package/lib/theme/SlidevPresentation/index.js +75 -0
- package/lib/theme/SlidevPresentation/index.js.map +1 -0
- package/lib/theme/SlidevPresentation/styles.module.css +178 -0
- package/lib/types/index.d.ts +171 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +6 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/fileSystem.d.ts +19 -0
- package/lib/utils/fileSystem.d.ts.map +1 -0
- package/lib/utils/fileSystem.js +89 -0
- package/lib/utils/fileSystem.js.map +1 -0
- package/lib/utils/icons.d.ts +23 -0
- package/lib/utils/icons.d.ts.map +1 -0
- package/lib/utils/icons.js +37 -0
- package/lib/utils/icons.js.map +1 -0
- package/lib/utils/logger.d.ts +43 -0
- package/lib/utils/logger.d.ts.map +1 -0
- package/lib/utils/logger.js +92 -0
- package/lib/utils/logger.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Builder utility for compiling Slidev presentations
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.buildPresentation = buildPresentation;
|
|
10
|
+
exports.buildAllPresentations = buildAllPresentations;
|
|
11
|
+
exports.checkSlidevInstalled = checkSlidevInstalled;
|
|
12
|
+
exports.diagnosePresentationIssues = diagnosePresentationIssues;
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const util_1 = require("util");
|
|
15
|
+
const path_1 = __importDefault(require("path"));
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
17
|
+
const logger_1 = require("../utils/logger");
|
|
18
|
+
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
19
|
+
/**
|
|
20
|
+
* Validates a presentation file before building
|
|
21
|
+
*/
|
|
22
|
+
function validatePresentation(presentation) {
|
|
23
|
+
// Check if file exists
|
|
24
|
+
if (!fs_1.default.existsSync(presentation.sourceAbsolutePath)) {
|
|
25
|
+
return {
|
|
26
|
+
valid: false,
|
|
27
|
+
error: `Source file not found: ${presentation.sourceAbsolutePath}`,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// Check if file is readable
|
|
31
|
+
try {
|
|
32
|
+
fs_1.default.accessSync(presentation.sourceAbsolutePath, fs_1.default.constants.R_OK);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return {
|
|
36
|
+
valid: false,
|
|
37
|
+
error: `Cannot read source file: ${presentation.sourceAbsolutePath}`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Check if file has content
|
|
41
|
+
const stats = fs_1.default.statSync(presentation.sourceAbsolutePath);
|
|
42
|
+
if (stats.size === 0) {
|
|
43
|
+
return {
|
|
44
|
+
valid: false,
|
|
45
|
+
error: "Source file is empty",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Check if file contains at least one slide separator or frontmatter
|
|
49
|
+
const content = fs_1.default.readFileSync(presentation.sourceAbsolutePath, "utf-8");
|
|
50
|
+
const hasFrontmatter = content.trim().startsWith("---");
|
|
51
|
+
const hasSlides = content.includes("---") || content.length > 50; // Basic check
|
|
52
|
+
if (!hasFrontmatter && !hasSlides) {
|
|
53
|
+
return {
|
|
54
|
+
valid: false,
|
|
55
|
+
error: "File does not appear to be a valid Slidev presentation (no frontmatter or slides found)",
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return { valid: true };
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Checks if a theme is installed
|
|
62
|
+
* Returns { installed: boolean, theme: string, isScoped: boolean }
|
|
63
|
+
*/
|
|
64
|
+
function checkThemeInstalled(themeName, siteDir) {
|
|
65
|
+
if (!themeName) {
|
|
66
|
+
// No theme specified, will use Slidev default
|
|
67
|
+
return { installed: true, theme: "default", isScoped: false };
|
|
68
|
+
}
|
|
69
|
+
const isScoped = themeName.startsWith("@");
|
|
70
|
+
const packageJsonPath = path_1.default.join(siteDir, "package.json");
|
|
71
|
+
try {
|
|
72
|
+
if (!fs_1.default.existsSync(packageJsonPath)) {
|
|
73
|
+
return {
|
|
74
|
+
installed: false,
|
|
75
|
+
theme: themeName,
|
|
76
|
+
isScoped,
|
|
77
|
+
error: "package.json not found",
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, "utf-8"));
|
|
81
|
+
const allDeps = {
|
|
82
|
+
...packageJson.dependencies,
|
|
83
|
+
...packageJson.devDependencies,
|
|
84
|
+
};
|
|
85
|
+
// Check if theme is in dependencies
|
|
86
|
+
const installed = themeName in allDeps;
|
|
87
|
+
return {
|
|
88
|
+
installed,
|
|
89
|
+
theme: themeName,
|
|
90
|
+
isScoped,
|
|
91
|
+
error: installed
|
|
92
|
+
? undefined
|
|
93
|
+
: `Theme '${themeName}' not found in dependencies`,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
return {
|
|
98
|
+
installed: false,
|
|
99
|
+
theme: themeName,
|
|
100
|
+
isScoped,
|
|
101
|
+
error: `Failed to check theme: ${error}`,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Builds a single Slidev presentation with real-time output streaming
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* Builds a single Slidev presentation with real-time output streaming
|
|
110
|
+
*/
|
|
111
|
+
async function buildPresentation(presentation, options, context) {
|
|
112
|
+
const startTime = Date.now();
|
|
113
|
+
try {
|
|
114
|
+
// Validate presentation before building
|
|
115
|
+
const validation = validatePresentation(presentation);
|
|
116
|
+
if (!validation.valid) {
|
|
117
|
+
throw new Error(validation.error);
|
|
118
|
+
}
|
|
119
|
+
// Determine which theme to use (presentation-specific or global)
|
|
120
|
+
const theme = presentation.theme || options.theme;
|
|
121
|
+
// Check if theme is installed
|
|
122
|
+
const themeCheck = checkThemeInstalled(theme, context.siteDir);
|
|
123
|
+
if (!themeCheck.installed && theme) {
|
|
124
|
+
(0, logger_1.logWarn)(`Theme '${theme}' not found in package.json for ${(0, logger_1.formatCode)(presentation.id)}`);
|
|
125
|
+
(0, logger_1.logWarn)(`Install with: npm install ${theme === "default" ? "@slidev/theme-default" : theme}`);
|
|
126
|
+
(0, logger_1.logWarn)("Build may hang or fail - Slidev doesn't exit properly when theme is missing");
|
|
127
|
+
}
|
|
128
|
+
// Build the base URL for the presentation
|
|
129
|
+
const baseUrl = context.baseUrl.endsWith("/")
|
|
130
|
+
? context.baseUrl.slice(0, -1)
|
|
131
|
+
: context.baseUrl;
|
|
132
|
+
const base = `${baseUrl}/${options.outputDir}/${presentation.id}/`;
|
|
133
|
+
// Construct the slidev build command arguments
|
|
134
|
+
const args = [
|
|
135
|
+
"build",
|
|
136
|
+
presentation.sourceAbsolutePath,
|
|
137
|
+
"--out",
|
|
138
|
+
presentation.outputPath,
|
|
139
|
+
"--base",
|
|
140
|
+
base,
|
|
141
|
+
];
|
|
142
|
+
if (theme) {
|
|
143
|
+
args.push("--theme", theme);
|
|
144
|
+
}
|
|
145
|
+
if (options.download) {
|
|
146
|
+
args.push("--download");
|
|
147
|
+
}
|
|
148
|
+
const timeoutMs = (options.buildTimeout || 60) * 1000;
|
|
149
|
+
if (options.verbose) {
|
|
150
|
+
(0, logger_1.logInfo)(`Command: slidev ${args.join(" ")}`);
|
|
151
|
+
(0, logger_1.logInfo)(`Working directory: ${(0, logger_1.formatPath)(context.siteDir)}`);
|
|
152
|
+
}
|
|
153
|
+
// Execute with spawn for real-time output and better control
|
|
154
|
+
const result = await new Promise((resolve) => {
|
|
155
|
+
const child = (0, child_process_1.spawn)("slidev", args, {
|
|
156
|
+
cwd: context.siteDir,
|
|
157
|
+
stdio: options.verbose ? "inherit" : "pipe",
|
|
158
|
+
});
|
|
159
|
+
let stdout = "";
|
|
160
|
+
let stderr = "";
|
|
161
|
+
let lastOutput = Date.now();
|
|
162
|
+
let timedOut = false;
|
|
163
|
+
let stallWarningShown = false;
|
|
164
|
+
let hasSeenBuildStart = false;
|
|
165
|
+
// Stall detection - check every 5 seconds if there's no activity
|
|
166
|
+
const stallCheckInterval = setInterval(() => {
|
|
167
|
+
const timeSinceLastOutput = (Date.now() - lastOutput) / 1000;
|
|
168
|
+
// If no output for 15 seconds and we haven't seen build start
|
|
169
|
+
if (timeSinceLastOutput > 15 &&
|
|
170
|
+
!hasSeenBuildStart &&
|
|
171
|
+
!stallWarningShown) {
|
|
172
|
+
stallWarningShown = true;
|
|
173
|
+
(0, logger_1.logWarn)(`No output for ${timeSinceLastOutput.toFixed(1)}s - Slidev may be stuck (likely missing theme or dependencies)`);
|
|
174
|
+
(0, logger_1.logWarn)("The process will timeout if no activity continues...");
|
|
175
|
+
}
|
|
176
|
+
}, 5000);
|
|
177
|
+
// Timeout handler
|
|
178
|
+
const timeout = setTimeout(() => {
|
|
179
|
+
timedOut = true;
|
|
180
|
+
clearInterval(stallCheckInterval);
|
|
181
|
+
child.kill("SIGTERM");
|
|
182
|
+
// Force kill after 5 seconds if not terminated
|
|
183
|
+
setTimeout(() => {
|
|
184
|
+
if (!child.killed) {
|
|
185
|
+
child.kill("SIGKILL");
|
|
186
|
+
}
|
|
187
|
+
}, 5000);
|
|
188
|
+
}, timeoutMs);
|
|
189
|
+
// Capture output for non-verbose mode
|
|
190
|
+
if (!options.verbose) {
|
|
191
|
+
child.stdout?.on("data", (data) => {
|
|
192
|
+
const output = data.toString();
|
|
193
|
+
stdout += output;
|
|
194
|
+
lastOutput = Date.now();
|
|
195
|
+
// Detect build start
|
|
196
|
+
if (output.includes("transforming") ||
|
|
197
|
+
output.includes("modules transformed") ||
|
|
198
|
+
output.includes("building")) {
|
|
199
|
+
hasSeenBuildStart = true;
|
|
200
|
+
}
|
|
201
|
+
// Show important progress messages
|
|
202
|
+
if (output.includes("✓") ||
|
|
203
|
+
output.includes("Building") ||
|
|
204
|
+
output.includes("Rendering") ||
|
|
205
|
+
output.includes("transforming")) {
|
|
206
|
+
process.stdout.write(` ${output.trim()}\n`);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
child.stderr?.on("data", (data) => {
|
|
210
|
+
const output = data.toString();
|
|
211
|
+
stderr += output;
|
|
212
|
+
lastOutput = Date.now();
|
|
213
|
+
// Show errors and important warnings immediately
|
|
214
|
+
if (output.includes("error") ||
|
|
215
|
+
output.includes("Error") ||
|
|
216
|
+
output.includes("Failed") ||
|
|
217
|
+
output.includes("Cannot find module") ||
|
|
218
|
+
output.includes("ENOENT")) {
|
|
219
|
+
process.stderr.write(` ⚠️ ${output.trim()}\n`);
|
|
220
|
+
}
|
|
221
|
+
// Filter and show other warnings
|
|
222
|
+
const filtered = (0, logger_1.filterSlidevOutput)(output);
|
|
223
|
+
if (filtered && filtered.trim() && !output.includes("error")) {
|
|
224
|
+
process.stderr.write(` ${filtered.trim()}\n`);
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
child.on("error", (error) => {
|
|
229
|
+
clearTimeout(timeout);
|
|
230
|
+
clearInterval(stallCheckInterval);
|
|
231
|
+
resolve({
|
|
232
|
+
success: false,
|
|
233
|
+
error: `Failed to spawn slidev: ${error.message}`,
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
child.on("close", (code) => {
|
|
237
|
+
clearTimeout(timeout);
|
|
238
|
+
clearInterval(stallCheckInterval);
|
|
239
|
+
if (timedOut) {
|
|
240
|
+
const timeSinceLastOutput = ((Date.now() - lastOutput) /
|
|
241
|
+
1000).toFixed(1);
|
|
242
|
+
const buildPhaseReached = hasSeenBuildStart
|
|
243
|
+
? "reached build phase but"
|
|
244
|
+
: "never started building";
|
|
245
|
+
let errorMsg = `Build timed out after ${options.buildTimeout || 60}s (${buildPhaseReached}, last activity: ${timeSinceLastOutput}s ago)`;
|
|
246
|
+
// Add specific guidance if we never saw build start
|
|
247
|
+
if (!hasSeenBuildStart) {
|
|
248
|
+
errorMsg += `\n\nLikely causes:\n`;
|
|
249
|
+
errorMsg += ` - Missing or unresolvable theme\n`;
|
|
250
|
+
errorMsg += ` - Missing dependencies (npm install may be needed)\n`;
|
|
251
|
+
errorMsg += ` - Slidev stuck in dependency resolution\n`;
|
|
252
|
+
errorMsg += `\nCapture full output with 'verbose: true' in plugin config to see what's happening.`;
|
|
253
|
+
}
|
|
254
|
+
resolve({
|
|
255
|
+
success: false,
|
|
256
|
+
error: errorMsg,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
else if (code !== 0) {
|
|
260
|
+
resolve({
|
|
261
|
+
success: false,
|
|
262
|
+
error: `Slidev exited with code ${code}\n${stderr || stdout}`,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
resolve({ success: true });
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
const duration = (Date.now() - startTime) / 1000;
|
|
271
|
+
if (!result.success) {
|
|
272
|
+
throw new Error(result.error);
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
id: presentation.id,
|
|
276
|
+
success: true,
|
|
277
|
+
duration,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
catch (error) {
|
|
281
|
+
const duration = (Date.now() - startTime) / 1000;
|
|
282
|
+
const errorMessage = error.message || String(error);
|
|
283
|
+
(0, logger_1.logError)(`Error building presentation ${(0, logger_1.formatCode)(presentation.id)}: ${errorMessage}`);
|
|
284
|
+
// Show diagnostics for failed builds
|
|
285
|
+
const issues = diagnosePresentationIssues(presentation, context.siteDir);
|
|
286
|
+
if (issues.length > 0) {
|
|
287
|
+
(0, logger_1.logWarn)(`Potential issues detected in ${(0, logger_1.formatCode)(presentation.id)}:`);
|
|
288
|
+
issues.forEach((issue) => (0, logger_1.logWarn)(` - ${issue}`));
|
|
289
|
+
}
|
|
290
|
+
return {
|
|
291
|
+
id: presentation.id,
|
|
292
|
+
success: false,
|
|
293
|
+
error: errorMessage,
|
|
294
|
+
duration,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Builds all presentations sequentially
|
|
300
|
+
* Returns array of build results
|
|
301
|
+
*/
|
|
302
|
+
async function buildAllPresentations(presentations, options, context) {
|
|
303
|
+
const results = [];
|
|
304
|
+
// Build presentations sequentially (not in parallel)
|
|
305
|
+
for (let i = 0; i < presentations.length; i++) {
|
|
306
|
+
const presentation = presentations[i];
|
|
307
|
+
(0, logger_1.logInfo)(`[${i + 1}/${presentations.length}] Building: ${(0, logger_1.formatCode)(presentation.id)}`);
|
|
308
|
+
const result = await buildPresentation(presentation, options, context);
|
|
309
|
+
results.push(result);
|
|
310
|
+
// Add a small delay between builds to avoid resource contention
|
|
311
|
+
if (i < presentations.length - 1) {
|
|
312
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// Summary
|
|
316
|
+
const successful = results.filter((r) => r.success).length;
|
|
317
|
+
const failed = results.filter((r) => !r.success).length;
|
|
318
|
+
const totalTime = results.reduce((sum, r) => sum + (r.duration || 0), 0);
|
|
319
|
+
if (failed > 0) {
|
|
320
|
+
(0, logger_1.logWarn)(`Build complete: ${successful} successful, ${failed} failed (total: ${totalTime.toFixed(2)}s)`);
|
|
321
|
+
// Log individual failures
|
|
322
|
+
results
|
|
323
|
+
.filter((r) => !r.success)
|
|
324
|
+
.forEach((result) => {
|
|
325
|
+
(0, logger_1.logError)(`Failed: ${(0, logger_1.formatCode)(result.id)} - ${result.error}`);
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
(0, logger_1.logSuccess)(`All presentations built successfully in ${totalTime.toFixed(2)}s!`);
|
|
330
|
+
}
|
|
331
|
+
return results;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Checks if Slidev CLI is available
|
|
335
|
+
*/
|
|
336
|
+
async function checkSlidevInstalled() {
|
|
337
|
+
try {
|
|
338
|
+
await execAsync("slidev --version");
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
catch (error) {
|
|
342
|
+
(0, logger_1.logError)("Slidev CLI not found. Please install @slidev/cli: npm install @slidev/cli");
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Diagnoses common issues with a presentation
|
|
348
|
+
*/
|
|
349
|
+
function diagnosePresentationIssues(presentation, siteDir) {
|
|
350
|
+
const issues = [];
|
|
351
|
+
try {
|
|
352
|
+
const content = fs_1.default.readFileSync(presentation.sourceAbsolutePath, "utf-8");
|
|
353
|
+
// Extract and check theme
|
|
354
|
+
const themeMatch = content.match(/^theme:\s*(.+)$/m);
|
|
355
|
+
if (themeMatch && siteDir) {
|
|
356
|
+
const themeName = themeMatch[1].trim().replace(/["']/g, "");
|
|
357
|
+
const themeCheck = checkThemeInstalled(themeName, siteDir);
|
|
358
|
+
if (!themeCheck.installed) {
|
|
359
|
+
issues.push(`🔴 CRITICAL: Theme '${themeName}' is NOT installed (causes Slidev to hang)`);
|
|
360
|
+
issues.push(` Fix: npm install ${themeName === "default" ? "@slidev/theme-default" : themeName}`);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
// Check for components that might be missing
|
|
364
|
+
const componentMatches = content.match(/<([A-Z][A-Za-z0-9]*)/g);
|
|
365
|
+
if (componentMatches) {
|
|
366
|
+
const components = [...new Set(componentMatches.map((m) => m.slice(1)))];
|
|
367
|
+
if (components.length > 0) {
|
|
368
|
+
issues.push(`Uses custom components: ${components.join(", ")} (may need ./components/ directory)`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
// Check for icon usage
|
|
372
|
+
if (content.includes("<carbon:") ||
|
|
373
|
+
content.includes("<mdi:") ||
|
|
374
|
+
content.includes("<simple-icons:")) {
|
|
375
|
+
issues.push("Uses icon components (may need @iconify dependencies)");
|
|
376
|
+
}
|
|
377
|
+
// Check for custom layouts
|
|
378
|
+
const layoutMatches = content.match(/layout:\s*([a-z-]+)/g);
|
|
379
|
+
if (layoutMatches) {
|
|
380
|
+
const layouts = [
|
|
381
|
+
...new Set(layoutMatches.map((m) => m.split(":")[1].trim())),
|
|
382
|
+
];
|
|
383
|
+
const customLayouts = layouts.filter((l) => ![
|
|
384
|
+
"default",
|
|
385
|
+
"cover",
|
|
386
|
+
"center",
|
|
387
|
+
"intro",
|
|
388
|
+
"end",
|
|
389
|
+
"section",
|
|
390
|
+
"quote",
|
|
391
|
+
"fact",
|
|
392
|
+
"statement",
|
|
393
|
+
"image",
|
|
394
|
+
"image-left",
|
|
395
|
+
"image-right",
|
|
396
|
+
"two-cols",
|
|
397
|
+
"iframe",
|
|
398
|
+
].includes(l));
|
|
399
|
+
if (customLayouts.length > 0) {
|
|
400
|
+
issues.push(`Uses custom layouts: ${customLayouts.join(", ")} (may require custom theme)`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
// Check for external images
|
|
404
|
+
if (content.includes("imageSrc:") || content.includes("src=")) {
|
|
405
|
+
const hasHttpImages = content.includes("http://") || content.includes("https://");
|
|
406
|
+
if (hasHttpImages) {
|
|
407
|
+
issues.push("Uses external images (requires network access during build)");
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
// Check file size
|
|
411
|
+
const sizeKB = (fs_1.default.statSync(presentation.sourceAbsolutePath).size / 1024).toFixed(1);
|
|
412
|
+
if (parseFloat(sizeKB) > 100) {
|
|
413
|
+
issues.push(`Large file size: ${sizeKB}KB (may slow build)`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
catch (error) {
|
|
417
|
+
issues.push(`Failed to analyze: ${error}`);
|
|
418
|
+
}
|
|
419
|
+
return issues;
|
|
420
|
+
}
|
|
421
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/plugin/builder.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAoIH,8CA4PC;AAMD,sDAkDC;AAKD,oDAUC;AAKD,gEA0GC;AApjBD,iDAA4C;AAC5C,+BAAiC;AACjC,gDAAwB;AACxB,4CAAoB;AAMpB,4CAQyB;AAEzB,MAAM,SAAS,GAAG,IAAA,gBAAS,EAAC,oBAAI,CAA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C;QAED,kBAAkB;QAClB,MAAM,MAAM,GAAG,CACb,YAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,IAAI,GAAG,IAAI,CACzD,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,oBAAoB,MAAM,qBAAqB,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main plugin entry point for docusaurus-plugin-slidev
|
|
3
|
+
*/
|
|
4
|
+
import type { LoadContext, Plugin } from "@docusaurus/types";
|
|
5
|
+
import { Joi } from "@docusaurus/utils-validation";
|
|
6
|
+
import type { PluginOptions, PluginContentData } from "../types";
|
|
7
|
+
/**
|
|
8
|
+
* Main plugin function
|
|
9
|
+
*/
|
|
10
|
+
export default function pluginSlidev(context: LoadContext, options: Partial<PluginOptions>): Plugin<PluginContentData>;
|
|
11
|
+
/**
|
|
12
|
+
* Validate plugin options using Docusaurus validation schema
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateOptions({ options, validate, }: {
|
|
15
|
+
options: Partial<PluginOptions>;
|
|
16
|
+
validate: typeof Joi;
|
|
17
|
+
}): PluginOptions;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,EACV,aAAa,EAEb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAuBlB;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,CAkH3B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAChC,QAAQ,EAAE,OAAO,GAAG,CAAC;CACtB,GAAG,aAAa,CAyBhB"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Main plugin entry point for docusaurus-plugin-slidev
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.default = pluginSlidev;
|
|
10
|
+
exports.validateOptions = validateOptions;
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
12
|
+
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
13
|
+
const scanner_1 = require("./scanner");
|
|
14
|
+
const builder_1 = require("./builder");
|
|
15
|
+
const logger_1 = require("../utils/logger");
|
|
16
|
+
const fileSystem_1 = require("../utils/fileSystem");
|
|
17
|
+
// Default plugin options
|
|
18
|
+
const DEFAULT_OPTIONS = {
|
|
19
|
+
sourceDir: "./slidev",
|
|
20
|
+
outputDir: "slides",
|
|
21
|
+
download: false,
|
|
22
|
+
overviewPath: "/slidev",
|
|
23
|
+
overviewTitle: "Slidev Presentations",
|
|
24
|
+
overviewTagline: "Interactive presentation overview",
|
|
25
|
+
id: "default",
|
|
26
|
+
buildTimeout: 60,
|
|
27
|
+
verbose: false,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Main plugin function
|
|
31
|
+
*/
|
|
32
|
+
function pluginSlidev(context, options) {
|
|
33
|
+
// Merge user options with defaults
|
|
34
|
+
const pluginOptions = {
|
|
35
|
+
...DEFAULT_OPTIONS,
|
|
36
|
+
...options,
|
|
37
|
+
};
|
|
38
|
+
let presentations = [];
|
|
39
|
+
const isDev = process.env.NODE_ENV === "development";
|
|
40
|
+
return {
|
|
41
|
+
name: "docusaurus-plugin-slidev",
|
|
42
|
+
/**
|
|
43
|
+
* Load content phase: Scan for Slidev presentations and build them in production
|
|
44
|
+
*/
|
|
45
|
+
async loadContent() {
|
|
46
|
+
presentations = await (0, scanner_1.scanPresentations)(pluginOptions, {
|
|
47
|
+
siteDir: context.siteDir,
|
|
48
|
+
baseUrl: context.baseUrl,
|
|
49
|
+
});
|
|
50
|
+
if (isDev && presentations.length > 0) {
|
|
51
|
+
(0, logger_1.logInfo)("Presentations will be available after running 'npm run build'");
|
|
52
|
+
}
|
|
53
|
+
else if (!isDev && presentations.length > 0) {
|
|
54
|
+
// Build presentations BEFORE Docusaurus builds
|
|
55
|
+
// This ensures they're in the static directory when Docusaurus copies static files
|
|
56
|
+
// Check if Slidev is installed
|
|
57
|
+
const slidevInstalled = await (0, builder_1.checkSlidevInstalled)();
|
|
58
|
+
if (!slidevInstalled) {
|
|
59
|
+
throw new Error("Slidev CLI is not installed. Run: npm install @slidev/cli");
|
|
60
|
+
}
|
|
61
|
+
// Prepare output directory
|
|
62
|
+
const outputPath = path_1.default.join(context.siteDir, "static", pluginOptions.outputDir);
|
|
63
|
+
// Clean up old presentations in output directory
|
|
64
|
+
(0, fileSystem_1.cleanupOutputDirectory)(outputPath);
|
|
65
|
+
// Clean up Slidev artifacts in source directory
|
|
66
|
+
const sourcePath = path_1.default.join(context.siteDir, pluginOptions.sourceDir);
|
|
67
|
+
(0, fileSystem_1.cleanupSourceDirectory)(sourcePath);
|
|
68
|
+
// Create .gitignore
|
|
69
|
+
(0, fileSystem_1.createGitignore)(outputPath);
|
|
70
|
+
// Build all presentations
|
|
71
|
+
await (0, builder_1.buildAllPresentations)(presentations, pluginOptions, {
|
|
72
|
+
siteDir: context.siteDir,
|
|
73
|
+
baseUrl: context.baseUrl,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
presentations,
|
|
78
|
+
config: pluginOptions,
|
|
79
|
+
isDev,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Content loaded phase: Make data available globally and add routes
|
|
84
|
+
*/
|
|
85
|
+
async contentLoaded({ content, actions }) {
|
|
86
|
+
const { setGlobalData, addRoute } = actions;
|
|
87
|
+
// Make presentation data available globally
|
|
88
|
+
setGlobalData(content);
|
|
89
|
+
// Add the overview page route
|
|
90
|
+
addRoute({
|
|
91
|
+
path: pluginOptions.overviewPath,
|
|
92
|
+
component: "@theme/SlidevOverview",
|
|
93
|
+
exact: true,
|
|
94
|
+
});
|
|
95
|
+
// Add routes for each individual presentation
|
|
96
|
+
presentations.forEach((presentation) => {
|
|
97
|
+
// Strip trailing slash from URL for route path
|
|
98
|
+
const routePath = presentation.url.endsWith("/")
|
|
99
|
+
? presentation.url.slice(0, -1)
|
|
100
|
+
: presentation.url;
|
|
101
|
+
addRoute({
|
|
102
|
+
path: routePath,
|
|
103
|
+
component: "@theme/SlidevPresentation",
|
|
104
|
+
exact: true,
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Provide theme components
|
|
110
|
+
*/
|
|
111
|
+
getThemePath() {
|
|
112
|
+
return path_1.default.resolve(__dirname, "../theme");
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Get path to type definitions
|
|
116
|
+
*/
|
|
117
|
+
getTypeScriptThemePath() {
|
|
118
|
+
return path_1.default.resolve(__dirname, "../types");
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Validate plugin options using Docusaurus validation schema
|
|
124
|
+
*/
|
|
125
|
+
function validateOptions({ options, validate, }) {
|
|
126
|
+
// Create schema using Joi from @docusaurus/utils-validation
|
|
127
|
+
const schema = utils_validation_1.Joi.object({
|
|
128
|
+
sourceDir: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.sourceDir),
|
|
129
|
+
outputDir: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.outputDir),
|
|
130
|
+
theme: utils_validation_1.Joi.string().optional(),
|
|
131
|
+
download: utils_validation_1.Joi.boolean().default(DEFAULT_OPTIONS.download),
|
|
132
|
+
overviewPath: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.overviewPath),
|
|
133
|
+
overviewTitle: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.overviewTitle),
|
|
134
|
+
overviewTagline: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.overviewTagline),
|
|
135
|
+
id: utils_validation_1.Joi.string().default(DEFAULT_OPTIONS.id),
|
|
136
|
+
buildTimeout: utils_validation_1.Joi.number()
|
|
137
|
+
.min(10)
|
|
138
|
+
.max(600)
|
|
139
|
+
.default(DEFAULT_OPTIONS.buildTimeout),
|
|
140
|
+
verbose: utils_validation_1.Joi.boolean().default(DEFAULT_OPTIONS.verbose),
|
|
141
|
+
});
|
|
142
|
+
const { value, error } = schema.validate(options);
|
|
143
|
+
if (error) {
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
return value;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAmCH,+BAqHC;AAKD,0CA+BC;AA1LD,gDAAwB;AAExB,mEAAmD;AAMnD,uCAA8C;AAC9C,uCAAwE;AACxE,4CAA6D;AAC7D,oDAI6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GAAG,CAAC,EAAE,CAAC;aACP,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC;QACxC,OAAO,EAAE,sBAAG,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC;KACxD,CAAC,CAAC;IAEH,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElD,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,KAAsB,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scanner utility for discovering Slidev presentations
|
|
3
|
+
*/
|
|
4
|
+
import type { PresentationMetadata, PluginOptions } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Scans for Slidev presentations and extracts metadata
|
|
7
|
+
*/
|
|
8
|
+
export declare function scanPresentations(options: PluginOptions, context: {
|
|
9
|
+
siteDir: string;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
}): Promise<PresentationMetadata[]>;
|
|
12
|
+
//# sourceMappingURL=scanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/plugin/scanner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EACV,oBAAoB,EAEpB,aAAa,EACd,MAAM,UAAU,CAAC;AA0ElB;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA6DjC"}
|