To run csscombx:
csscombx path[ path[...]]path can be either a directory or a file:
csscombx ./my-styles public/styles.cssIf you installed the package locally, use local bin file instead:
./node_modules/.bin/csscombx ./my-styles public/styles.cssIf you run csscombx -h, it will show some helpful information:
csscombx -h
Usage: csscombx [options] <file ...>
Options:
-h, --help output usage information
-V, --version output the version number
-v, --verbose verbose mode
-c, --config [path] configuration file path
-d, --detect detect mode (would return detected options)
-l, --lint in case some fixes needed returns an error
-t, --tty-mode execution in TTY mode (useful, when running tool using external app, e.g. IDE)If you want to use custom config instead of predefined drupal.json just
put a file named .csscombx.json to project's root (see configuration
docs for more information).
However, if for some reason you would like to use custom path, do it this way:
csscombx -c path/to/config styles.cssIf you want to generate a config file based on a template file, run:
csscombx -d example.css > .csscombx.jsonSee configuration docs for more information.
CSScomb can be used as a --lint or -l argument, i.e. telling you what should be changed instead
of modifying anything.
This option should be combined with --verbose or -v argument which is optional when
processing files with a regular csscombx command. Useful for debugging purposes.
csscombx -lv ./my-styles
good: ./my-styles/main.scss
bad: ./my-styles/main.scss
empty: ./my-styles/main.scss
invalid: ./my-styles/main.scss
now is good: ./my-styles/main.scss
4 files processed
0 files fixed
spent: 30ms