Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/fdaciuk/css2json-cli
- Owner: fdaciuk
- Created: 2016-02-26T01:32:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T01:36:54.000Z (over 8 years ago)
- Last Synced: 2024-08-13T09:05:20.853Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/css2json-cli
- Size: 1.95 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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