// Compile all section-1 slides into a single PPTX // Output: section1.pptx (27 slides, 16:9, dark theme, code-heavy) const path = require('path'); const fs = require('fs'); const pptxgen = require('pptxgenjs'); const ds = require('./design-system'); const { theme } = ds; const pres = new pptxgen(); pres.layout = 'LAYOUT_16x9'; pres.title = 'LangChain 1.0: chains, LCEL, agents, retrievers'; pres.author = 'lc-evo-deck'; pres.subject = 'Section 1 of the LangChain Evolution deck'; const SLIDE_COUNT = 27; for (let i = 1; i <= SLIDE_COUNT; i++) { const num = String(i).padStart(2, '0'); const file = path.join(__dirname, `slide-${num}.js`); if (!fs.existsSync(file)) { throw new Error('Missing slide module: ' + file); } const mod = require(file); if (typeof mod.createSlide !== 'function') { throw new Error('Module does not export createSlide: ' + file); } mod.createSlide(pres, theme); } const outFile = path.join(__dirname, 'section1.pptx'); pres.writeFile({ fileName: outFile }) .then((fileName) => { console.log('OK ->', fileName); console.log('Slides:', SLIDE_COUNT); }) .catch((err) => { console.error('ERR:', err); process.exit(1); });