GithubHelp home page GithubHelp logo

jetbrains-csscomb's Introduction

DEPRECATED

This version of CSScomb is no longer supported, guys.
We have a new super cool Node.js version instead!

Tool for sorting CSS properties

  • Sorts CSS properties into a logical, consistent order
  • Allows for custom sorting of CSS properties (set it to whatever order you're accustomed to)
  • Parses CSS in style tags and style attributes -- can comb other languages for CSS as well
  • Does not change existing formatting of style sheets --target single or multiple lines of CSS
  • Separates CSS properties into groups (you can have groups of empty strings, if you want)
  • Fully supports CSS2/CSS2.1/CSS3

The CSScomb algorithm simulates a web developer's judgment in ordering CSS styles. You can spend tons of time re-ordering code--moving lines over each other, working around comments in the code, moving multi-line sets of property values, and all sorts of hacking to make your code more readable. CSScomb takes care of these tasks for you. It "thinks" like a person editing the text, not as a blind robot parsing CSS.

CSScomb.com

The Requirements

CSScomb is written in pure PHP, without any external libraries or dependencies. See details at wiki.

  • Sublime Text 2 plugin avaliable in Package Control as 'CSScomb'
  • TextMate plugin
  • Coda plugin
  • Coda 2 plugin
  • Espresso 2 plugin (How to install)
  • IntelliJIDEA plugin
  • WebStorm plugin
  • PyCharm plugin
  • Notepad ++ plugin
  • Chocolat Mixin
  • Vim Plugin

CLI usage

Available at csscomb.com

% php csscomb.php

CSSComb
Command line tool for resort CSS code.

SYNOPSIS
    $ php csscomb.php -s <file with JSON array> -i <path to input css file> -o <path to result css file>

DESCRIPTION
    options:
    -s, --sort-order    specify file with custom sort order. File must contain JSON data. For detail information run 'csscomb.php --help-sort-order'
    -i, --input         must be directory name or file that needs to be sorted
    -o, --output        sort result file. Use output when input is not a directory name, otherwise output param ignored. If output filename does not exist, the file is created. Otherwise, the existing file is overwritten.

    --help, -help, -h, -? or no options will print this man.

EXAMPLE
    csscomb.php -s my-custom-sort-order.json -i css/style.css -o css/style-resorted.css

EXAMPLE 2
    csscomb.php -i some_directory_name

Twitter

@csscomb

jetbrains-csscomb's People

Contributors

lysyi3m avatar tonyganch avatar yakovlevkll avatar yiqinzhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jetbrains-csscomb's Issues

Native Jetbrains plugin

Hi, it would be awesome to have a native plugin for Jetbrains products!
Anything like this in the pipeline?

File Watcher: Does not work on partial files

I setup a file watcher for my .scss files in the intellij.

– Name: CSScomb
– Program: path_to_installed_csscomb/bin/csscomb
– Parameters: -t $FilePath$
– Working directory: $FileDir$

I works wonderful with .scss files but It doesn't run on partial files that start with _ characters.

Webstorm 2017.2 - Error running 'CSScomb': Cannot run program

Error running 'CSScomb': Cannot run program "D:\node_modules\csscomb\bin\csscomb" (in directory "D:\Temp\www\root"): CreateProcess error=193, %1 не является приложением Win32

I did everything according to the instructions.
https://image.prntscr.com/image/UdYWI8nEQG6bTSEEdJZCBw.png

In the project's root is .csscomb.json from samples
https://image.prntscr.com/image/sWZuYEdQRoSwgPE8lOyyZQ.png

but i have the error (((

Please help me figure out where my mistake is.

[Windows] Error 193 WebStorm8

It works fine with command line "csscomb assets/css".
But when I try to sort files using created CSScomb tool it crashes with Error 193: %1 is not a valid Win32 application.
I already had checked info from microsoft (http://support.microsoft.com/kb/812486) but it still not working.
Program path in WebStromTools is: C:\Users\username\node_modules\csscomb\bin\csscomb (without spaces and copies)

New PHPStorm different settings

I used different settings by the way, cause I received an error saying the "Working directory" wasn't actually an directory (obviously), while running the script.

These are my settings:
Name: CSScomb
Program: csscomb
Parameters: $FilePath$ (I prefer to modify one file at a time, not a complete directory)
Working directory: /usr/local/lib/node_modules/csscomb/bin

And I've added a keymap, so I could use a shortcut to execute csscomb:

  1. Go to Preferences > Keymap
  2. In the list search for csscomb.
  3. Double-click on CSScomb.
  4. Click on Add Keyboard Shortcut in the menu which just appeared and hit your shortcut.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.