1.6 KiB
1.6 KiB
@gram/playground
The official browser-based playground for the GRAM Language. It allows you to write, edit, and physically analyze recipes in real-time.
📚 General Documentation
For full syntax specifications, grammar details, cheatsheets, and best practices, please refer to the central GRAM Documentation Index.
⚡ Features
- Real-time Rendering: Instantly compiles your recipe into JSON, Markdown, and a gorgeous interactive Preview card.
- Physical Analysis: Simulates Net vs Gross weights and nutritional macronutrient curves dynamically by loading a CIQUAL/USDA derived database.
- Gantt Scheduler: Displays active and total durations dynamically.
- Pre-built Example Library: Access various recipes to quickly learn the grammar.
- Deduplicated Tree Explorer: Browse the nested JSON output interactively.
🛠️ Local Development & Running
To run the playground locally from the repository root:
- Install Monorepo Dependencies:
npm install - Build the Parser, Compiler, and Analyzer:
npm run build - Start the Playground Dev Server:
Opennpm run devhttp://localhost:3000in your web browser.
🏗️ Bundle Process
- The playground uses esbuild (
build.js) to bundle all sources (shims, styles, external dependencies) into thedist/directory. - The large ingredient database is compiled into a lazy-loaded chunk (
chunks/db_bundle.js) to ensure fast page loads.