Registry / roole-compiler

roole-compiler

JSON →
library0.6.0jsnpmunverified

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.

npm install roole-compiler
INSTALL
IMPORT
SIG · ROOLE-COMPILER
R
roole-compiler
javascriptv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compile
var compiler = require('roole-compiler'); compiler.compile(ast);
import { compile } from 'roole-compiler'; // ESM not supported
CommonJS only; no ES module or TypeScript bindings.
compiler
var compiler = require('roole-compiler');
// None; only CommonJS pattern exists
Default export is the entire module, not a named compile function directly.
compile
const compiler = require('roole-compiler'); const str = compiler.compile(ast, { indent: ' ', precision: 2 });
require('roole-compiler').compile(ast); // requires .compile explicitly
Options object is optional; defaults: indent='\t', precision=3.

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; // }
Debug
Known issues
gotchaCompiler expects AST from roole-parser exactly; incompatible with other parsers.
fix
Always pair roole-compiler with roole-parser.
affects: >=0.0.0
deprecatedProject is unmaintained since 2016; no updates or security patches.
fix
Consider migrating to a modern CSS preprocessor like PostCSS or Sass.
affects: 0.6.0
gotchaNo error handling for malformed AST; compile may throw unhelpful errors.
fix
Validate AST with roole-parser before compiling.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'roole-compiler'
Package is not installed or not found in node_modules.
fix
Run 'npm install roole-compiler'.
compiler.compile is not a function
Using ES6 import style on a CommonJS module.
fix
Use require('roole-compiler') instead of import.
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
roole-parserrequiredThe compiler expects an AST from roole-parser, making it a required peer for compilation.
Agent activity
4 hits · last 30 days
node
4
Resources
roole-compiler — npm install roole-compiler · libregistry