feat: preview

This commit is contained in:
2026-02-23 19:07:04 +07:00
parent 2a5494c220
commit eeb67b8e9b
5 changed files with 1358 additions and 800 deletions
+4 -3
View File
@@ -9,7 +9,7 @@ Printable math worksheet generator (A4 PDF) for children aged 7–9. Claude Code
```bash
npm run build:css # Build Tailwind CSS (minified)
npm run build:css:watch # Watch mode for CSS
npm run preview # Serve HTML at localhost:3000
npm run preview # Serve HTML at localhost:3000 with live-reload
npm run dev # CSS watch + preview server (concurrent)
npm run pdf -- <file> # Convert HTML file to PDF
npm run remove-bg -- <file|dir> # Remove white background from PNG icons
@@ -185,5 +185,6 @@ Puppeteer settings for A4 worksheets:
2. Claude creates/updates a JSON config in `tasks/` with `pages[].task` descriptions
3. Claude reads `src/templates/space-base.html` + `src/examples/space-worksheet.html` as references
4. Claude generates HTML file in `output/html/` — creates concrete problems from `task` text, assigns unique shuffled icons, builds all pages
5. Run `npm run pdf -- output/html/<file>.html` to create PDF
6. Preview with `npm run preview` at localhost:3000
5. Add a link to the new document in `output/index.html` (card with title and path)
6. Run `npm run pdf -- output/html/<file>.html` to create PDF
7. Preview with `npm run preview` at localhost:3000