0.0.1 • Published 3 years ago

stylops v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

stylops

Write JSON as CSS

oclif Version Downloads/week License

Why

MORE PAIN! NO GAIN!

Instead of make your work of write JSON (maybe YAML) configuration file better this will make it worse.

We really hope you didn't try to cheat using any prep-processor like stylus, sass, less, because if you do, your verbose CSS will gain features like variables, includes, mixins and etc, please don't do that.

Unintended side-effect, every selector merges objects deeply, this means that if you write your selector two times your object will:

  1. Merge properties
  2. Overwrite if exists

Fortunately, unlike any pre-processor, include isn't supported, otherwise you could use it to make any included file change any property of final json, like happens when mutiple css files have same selector, example.

Please look at tests and anti-patterns to known what you should and shouldn't do.

TODO

  • Make array harder to write

Usage

$ npm install -g stylops
$ stylops (-v|--version|version)
stylops/0.0.1 linux-x64 node-v15.2.1
$ stylops --help 
USAGE
$ stylops -i test/fixture.css -o fixture.json
...