Files
Talks/tools/list-slugs.mjs
T
Le Prévost-Corvellec Arnault 354c8cd9ef Add Makefile, package.json, and initial configuration for VitePress and Slidev integration
- Introduced a Makefile for streamlined commands related to building, running, and managing presentations.
- Created package.json to define project metadata, dependencies, and scripts for development and testing.
- Added .gitignore entries to exclude build artifacts and temporary files from version control.
- Included playwright.config.mjs for end-to-end testing setup with Playwright.
- Added README.md for project documentation, outlining setup instructions and development guidelines.
2026-04-11 15:59:20 +02:00

21 lines
634 B
JavaScript

/**
* Dossiers de présentation sous slides/ (hors wip_*), avec meta.json + slides.md.
*/
import fs from 'node:fs'
import path from 'node:path'
export function listPresentationSlugs(root) {
const slides = path.join(root, 'slides')
if (!fs.existsSync(slides)) return []
return fs
.readdirSync(slides, { withFileTypes: true })
.filter((d) => d.isDirectory() && !d.name.startsWith('wip_') && !d.name.startsWith('_'))
.map((d) => d.name)
.filter((slug) => {
return (
fs.existsSync(path.join(slides, slug, 'meta.json')) &&
fs.existsSync(path.join(slides, slug, 'slides.md'))
)
})
}