Using Stylify CSS in Node.js

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Stylify can be used directly @stylify/stylify or via the @stylify/bundler package.

Integration example for the Node.js can be found in integrations examples repository .

How to integrate the Stylify CSS into the Node.js

You can create your own compliation process or use the @stylify/bundler package.

Using @stylify/stylify directly

For more information see Stylify documentation:

import { Compiler } from '@stylify/stylify';

const content = '';

const compiler = new Compiler({
    variables: {},
    macros: {},
    components: {},
    // ...

const compilationResult = compiler.compile(content);
const css = compilationResult.generateCss();
const mangledContent = compiler.rewriteSelectors(content, compilationResult);

Using @stylify/bundler package

For more information see bundler documentation.