{"id":25686,"library":"gss-compiler","title":"GSS Compiler","description":"A compiler that parses GSS (Grid Style Sheets) rule strings into JSON AST format for execution by the GSS engine. Version 0.8.2 is the latest stable release; the project appears dormant with no recent releases or maintenance. GSS is a constraint-based layout system for the web, offering an alternative to CSS for complex layouts using constraint solving. The compiler outputs a JSON AST that the GSS engine uses to compute layout changes in the browser. This differentiates it from traditional CSS preprocessors by enabling real-time layout adjustments based on constraints.","status":"abandoned","version":"0.8.2","language":"javascript","source_language":"en","source_url":"git://github.com/the-gss/compiler","tags":["javascript"],"install":[{"cmd":"npm install gss-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add gss-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add gss-compiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package does not ship type definitions; may not work in strict ESM environments.","wrong":"const compile = require('gss-compiler').compile;","symbol":"compile","correct":"import { compile } from 'gss-compiler';"},{"note":"The module has a default export? Check actual usage; the readme suggests using `require('gss-compiler').compile`.","wrong":"const compiler = require('gss-compiler');","symbol":"default","correct":"import compiler from 'gss-compiler';"},{"note":"CommonJS require is typical for this older package. Destructuring may work but not guaranteed.","wrong":"const { compile } = require('gss-compiler');","symbol":"compile","correct":"const compile = require('gss-compiler').compile;"}],"quickstart":{"code":"import { compile } from 'gss-compiler';\n\nconst gss = `\n  #header {\n    width: == 100%;\n  }\n  #sidebar {\n    width: == 200px;\n  }\n  #content {\n    width: == 100% - #sidebar[width];\n  }\n`;\n\nconst ast = compile(gss);\nconsole.log(JSON.stringify(ast, null, 2));\n// Outputs JSON AST that can be fed into GSS engine","lang":"javascript","description":"Demonstrates compiling a simple GSS rule string to JSON AST."},"warnings":[{"fix":"Consider using CSS Grid Layout or other modern layout solutions instead of GSS.","message":"The GSS project is no longer actively maintained. The compiler may have bugs and missing features.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Create a .d.ts file: declare module 'gss-compiler' { export function compile(gss: string): any; }","message":"The package does not ship TypeScript type definitions. Usage in TypeScript projects requires custom type declarations.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use require('gss-compiler').compile for compatibility.","message":"CommonJS require is the only supported module format; ES module import may fail depending on bundler.","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":"Run npm install gss-compiler","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'gss-compiler'"},{"fix":"Use const compile = require('gss-compiler').compile;","cause":"Incorrect import: using default import when the module exports an object with compile property.","error":"compile is not a function"},{"fix":"Check the GSS documentation for valid syntax. Ensure using a recent version of the compiler.","cause":"GSS syntax error or unsupported feature.","error":"Unexpected token: ... in GSS"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}