{"id":26584,"library":"vgl-compiler","title":"VGL Compiler","description":"A compiler that transforms Visual Grid Language (VGL) statements, used in GSS (Grid Style Sheets), into GSS-flavored Visual Format Language (VFL). Current version 0.0.6 is an early release with minimal documentation. It aims to provide feature parity with W3C Grid Layout Module using constraint-based primitives. The project has been moved to the GSS organization on GitHub. Key differentiator: enables 2D grid layout authoring via VGL, compiled to 1D VFL constraints.","status":"active","version":"0.0.6","language":"javascript","source_language":"en","source_url":"git://github.com/gss/vgl-compiler","tags":["javascript"],"install":[{"cmd":"npm install vgl-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add vgl-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add vgl-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Reports compilation errors","package":"error-reporter","optional":false}],"imports":[{"note":"ESM-only export","wrong":"const compile = require('vgl-compiler')","symbol":"compile","correct":"import { compile } from 'vgl-compiler'"},{"note":"Default export is the compile function","wrong":"const vglCompiler = require('vgl-compiler')","symbol":"default","correct":"import vglCompiler from 'vgl-compiler'"},{"note":"Type exports for custom compile options","wrong":"const { TokenType } = require('vgl-compiler')","symbol":"TokenType","correct":"import { TokenType } from 'vgl-compiler'"}],"quickstart":{"code":"import { compile } from 'vgl-compiler';\n\nconst vglCode = `\n  @grid [container] {\n    columns: 1fr 1fr 1fr;\n    rows: auto 200px;\n    areas: \"a b c\" \"d e f\";\n  }\n`;\n\nconst vflOutput = compile(vglCode);\nconsole.log(vflOutput);\n// Output: VFL representation of the grid","lang":"typescript","description":"Compile a VGL grid definition into VFL constraints."},"warnings":[{"fix":"Consider using grid layout directly or browser-native CSS Grid.","message":"The package has not been updated since 2015 and may have unresolved bugs.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update dependency to gss/vgl-compiler and ensure version >=0.0.6.","message":"Package was moved: old repo at gss/vfl-compiler, new at gss/vgl-compiler.","severity":"breaking","affected_versions":"<0.0.6"},{"fix":"Use @types/vgl-compiler if available or declare module.","message":"No TypeScript typings shipped; manual typing may be needed.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install vgl-compiler@0.0.6 (or add error-reporter to your own dependencies).","cause":"v0.0.5 and earlier omitted error-reporter as a dependency.","error":"Cannot find module 'error-reporter'"},{"fix":"Use import { compile } from 'vgl-compiler' instead of require('vgl-compiler').compile.","cause":"Using default import from CommonJS require incorrectly.","error":"TypeError: compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}