Registry / serialization / cabel
library0.1.3jsnpmunverified

Cabel is a CSSX transpiler that converts CSSX syntax into valid JavaScript. Version 0.1.3 is the latest release, but the project is deprecated; its functionality has been absorbed into the main CSSX project (https://github.com/krasimir/cssx). It was designed as a Babel plugin-like tool for transforming CSS-like stylesheets embedded in JavaScript. No active development, as all transpilation features are now maintained under the CSSX umbrella. Use cssx instead.

npm install cabel
INSTALL
IMPORT
SIG · CABEL
C
cabel
serializationjavascriptv0.1.3
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.

default
import cabel from 'cabel'
const cabel = require('cabel')
Cabel is ESM-only. CommonJS require will fail.
transform
import { transform } from 'cabel'
const { transform } = require('cabel')
Escape require; tree-shakeable named export.
Cabel
import Cabel from 'cabel'
import { Cabel } from 'cabel'
Default export is a class/function, not a named export.

Transforms CSSX syntax into JavaScript object literal.

import cabel from 'cabel'; const code = ` const styles = { color: red, fontSize: 14px }; `; const result = cabel(code); console.log(result); // => 'var styles = {\n color: "red",\n fontSize: "14px"\n};'
Debug
Known issues
deprecatedCabel is deprecated; functionality moved to CSSX project.
fix
Use https://github.com/krasimir/cssx instead.
affects: >=0.0.0
gotchaCabel only transpiles CSSX embedded in JS; it does not bundle or transform JSX.
fix
Use cssx for full transpilation pipeline.
affects: >=0.0.0
breakingVersion 0.1.0 changed the default export from transform function to a class.
fix
Update import to use default export as callable: cabel(code).
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'cabel'
Missing install or deprecated package removed from registry.
fix
npm install cabel@0.1.3 --save
cabel is not a function
Using wrong import (e.g., named instead of default).
fix
Use 'import cabel from "cabel"' or 'cabel = require("cabel").default'
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
cabel — npm install cabel · libregistry