Files
soroban-abacus-flashcards/packages/templates/package.json
Thomas Hallock 505ff66bd5 feat: add static site generator for gallery with embedded SVGs
- Add build-gallery.js: Static site generator that embeds SVG content directly
- Creates gallery-static.html: Complete standalone gallery page
- No CORS issues - all SVGs embedded as inline content
- Clean, professional layout with hover effects and responsive grid
- Build stats showing embedded/missing SVGs with timestamps
- Add npm scripts: gallery:build, gallery:static, updated gallery:clean
- Perfect for sharing or hosting - single self-contained HTML file

Usage:
- npm run gallery:static    (generate SVGs + build static gallery)
- npm run gallery:build     (just build from existing SVGs)

This replaces the fetch()-based approach that had CORS issues.
The static generator creates a complete, shareable HTML file.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 10:16:11 -05:00

58 lines
2.0 KiB
JSON

{
"name": "@soroban/templates",
"version": "0.1.0",
"description": "Shared Typst templates for Soroban flashcard generation",
"main": "index.js",
"types": "index.d.ts",
"files": [
"*.typ",
"index.js",
"index.d.ts",
"__init__.py",
"pyproject.toml",
"README.md"
],
"scripts": {
"build": "echo 'Templates package - no build needed'",
"dev": "echo 'Templates package - watching for changes'",
"test": "npm run test:validate && npm run test:node && npm run test:python && npm run test:integration",
"test:node": "node test.js",
"test:python": "python3 test.py",
"test:validate": "node test-validate.js",
"test:integration": "node test-integration.js",
"test:ci": "./ci-test.sh",
"test:watch": "echo 'Watching templates for changes...' && fswatch -o *.typ | xargs -n1 -I{} npm run test",
"docs": "echo 'Documentation available in README.md'",
"clean": "rm -rf __pycache__ *.pyc .pytest_cache",
"lint": "echo 'No linting configured for templates'",
"verify": "npm run test:validate && npm run test:node && npm run test:python",
"examples": "echo 'Running examples...' && node examples/node-example.js && python3 examples/python-example.py",
"examples:node": "node examples/node-example.js",
"examples:python": "python3 examples/python-example.py",
"gallery": "node generate-gallery.js",
"gallery:build": "node build-gallery.js",
"gallery:static": "npm run gallery && npm run gallery:build && open gallery-static.html",
"gallery:clean": "rm -rf gallery/ gallery-static.html gallery-embedded.html"
},
"keywords": [
"typst",
"templates",
"soroban",
"abacus",
"flashcards",
"monorepo",
"typescript",
"python"
],
"author": "Soroban Flashcards Team",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/soroban-flashcards/soroban-abacus-flashcards",
"directory": "packages/templates"
},
"engines": {
"node": ">=18.0.0",
"python": ">=3.8"
}
}