Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fdaciuk/css2json-cli

Convert CSS string to JSON
https://github.com/fdaciuk/css2json-cli

Last synced: about 1 month ago
JSON representation

Convert CSS string to JSON

Awesome Lists containing this project

README

        

# CSS2JSON

> CLI tool to convert CSS String to JSON

## Installation

For using directly on terminal, install globally:

```console
[sudo] npm i -g css2json-cli
```

For using as npm script, just type:

```console
npm i --save-dev css2json
```

## Usage

```console
css2json
```

### Example

Input:

```console
css2json "font: 14px Arial, sans-serif; color: #fff"
```

Output:

```console
{ "font": "14px Arial, sans-serif", "color": "#fff" }
```

## Todo

- [ ] Convert all CSS file
- [ ] Option to convert just properties
- [ ] Option to return as JS object

## License

[MIT License](https://github.com/fdaciuk/licenses/blob/master/MIT-LICENSE.md) © Fernando Daciuk