roole-compiler

raw JSON →
0.6.0 verified Fri May 01 auth: no javascript abandoned

Roole compiler converts Roole CSS AST (from roole-parser) into CSS string. Version 0.6.0 is the latest and only stable release, with no updates since 2016. It is a standalone component of the Roole preprocessor ecosystem. Differentiator: direct AST-to-CSS compilation with configurable indentation and numeric precision. Limited adoption and no active maintenance.

error Cannot find module 'roole-compiler'
cause Package is not installed or not found in node_modules.
fix
Run 'npm install roole-compiler'.
error compiler.compile is not a function
cause Using ES6 import style on a CommonJS module.
fix
Use require('roole-compiler') instead of import.
gotcha Compiler expects AST from roole-parser exactly; incompatible with other parsers.
fix Always pair roole-compiler with roole-parser.
deprecated Project is unmaintained since 2016; no updates or security patches.
fix Consider migrating to a modern CSS preprocessor like PostCSS or Sass.
gotcha No error handling for malformed AST; compile may throw unhelpful errors.
fix Validate AST with roole-parser before compiling.
npm install roole-compiler
yarn add roole-compiler
pnpm add roole-compiler

Parses a simple Roole rule and compiles the AST to a CSS string.

var parser = require('roole-parser');
var compiler = require('roole-compiler');

var ast = parser.parse('body { margin: 0 }');
var str = compiler.compile(ast);
console.log(str);
// Output:
// body {
// 	margin: 0;
// }