A lightweight CSS parser in JavaScript / TypeScript.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
package.json
tsconfig.json

README.md

CSS Parser

A lightweight CSS parser in JavaScript / TypeScript.

The returned structure

[
  {
    selector: string;
    type?: string;
    children?: [...];
    comments?: string;
    styles?: string;
    rules?: [
      {
        key: string;
        value: string;
        defective?: boolean;
      }, ...
    ]
  }, ...
]

Quick Start

Install the css-parser from the github repo.

npm install sibvrv/css-parser

Development

Build

npm run build

How to test

npm run test