MCPcopy
hub / github.com/csscomb/csscomb.js

github.com/csscomb/csscomb.js @v4.3.0 sqlite

repository ↗ · DeepWiki ↗ · release v4.3.0 ↗
162 symbols 304 edges 120 files 78 documented · 48%
README

CSScomb CSSComb

Build Status NPM version Dependency Status devDependency Status

CSScomb is a coding style formatter for CSS. You can easily write your own configuration to make your style sheets beautiful and consistent.

The main feature is sorting properties in a specific order. It was inspired by @miripiruni's PHP-based tool of the same name. This is the new JavaScript version, based on the powerful CSS parser Gonzales PE.

1. Install

Global installation (for use as a command-line tool):

npm install csscomb -g

Local installation (for use as a command-line tool within current directory):

npm install csscomb

To install as a project dependency (the package will appear in your dependencies):

npm install csscomb --save

To install as a dev dependency (the package will appear in your devDependencies):

npm install csscomb --save-dev

2. Configure

There are a number of ways to configure CSScomb:

  • Use one of predefined configs
  • Put .csscomb.json file in the project root.
  • Set path to config's file
  • Use *.css file as a template

3. Use

Command Line

csscomb assets/css

Node.js module

var Comb = require('csscomb');
var comb = new Comb('zen');
comb.processPath('assets/css');

4. Contribute

This project is actively mantained. But anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.

Also you can become a mantainer. To do that please ping @tonyganch.

Authors

@mishanga, @tonyganch

Thanks for assistance and contributions:

@miripiruni, @anton-rudeshko, @cvrebert, @filtercake, @ignovak, @kizu, @lefoy, @L0stSoul, @mishaberezin, @puzankov, @schneyra, @thejameskyle, @vecmezoni

License

This software is released under the terms of the MIT license.

Other projects

  • https://github.com/senchalabs/cssbeautify
  • https://github.com/css/gonzales
  • https://github.com/tonyganch/gonzales-pe
  • https://github.com/css/csso
  • https://github.com/nzakas/parser-lib

Core symbols most depended-on inside this repo

shouldBeEqual
called by 232
test/options/option_test.js
shouldDetect
called by 121
test/options/option_test.js
configure
called by 46
src/core.js
processString
called by 46
src/core.js
shouldBeEqual
called by 35
test/core/core_test.js
readFile
called by 13
test/options/option_test.js
useConfig
called by 7
test/options/option_test.js
walk
called by 6
src/options/vendor-prefix-align.js

Shape

Function 122
Method 34
Class 6

Languages

TypeScript100%

Modules by API surface

src/core.js24 symbols
src/options/sort-order.js23 symbols
src/options/lines-between-rulesets.js17 symbols
src/options/vendor-prefix-align.js11 symbols
src/errors.js11 symbols
src/options/block-indent.js9 symbols
test/options/option_test.js8 symbols
test/core/core_test.js8 symbols
src/cli.js8 symbols
src/options/always-semicolon.js6 symbols
src/options/eof-newline.js5 symbols
src/options/element-case.js5 symbols

Dependencies from manifests, versioned

@babel/cli7.2.3 · 1×
@babel/core7.4.0 · 1×
@babel/node7.2.2 · 1×
@babel/plugin-transform-destructuring7.4.0 · 1×
@babel/plugin-transform-strict-mode7.2.0 · 1×
@babel/polyfill7.4.0 · 1×
acorn6.1.1 · 1×
eslint5.15.3 · 1×
gonzales-pe4.2.4 · 1×
jshint2.10.2 · 1×
minimatch3.0.4 · 1×
minimist1.2.0 · 1×

For agents

$ claude mcp add csscomb.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact