csscomb / jetbrains-csscomb

CSScomb plugin for JetBrains IDEs: IDEA, PyCharm, WebStorm, PhpStorm, RubyMine
87 stars 7 forks source link

Php storm comb not working #6

Open maliyshock opened 7 years ago

maliyshock commented 7 years ago

I run through all steps in docs, but steel nothing. Am i do somthing wrong?

http://joxi.ru/GrqzoBqIQY06jm http://joxi.ru/12MBMxksMKWLJA http://joxi.ru/MAjGKeks4LBaQr

vbelius commented 7 years ago

Had the same problem, although it was working if I ran the same command in the terminal.

Solved by installing version 3.1.5 (tried a bunch of versions):

npm install -g csscomb@3.1.5

simofacc commented 7 years ago

@vbelius Thanks for the correct version. Don't know what happened with csscomb recently, was working then I updated and it was not finishing the process anymore.

gabriensymons commented 7 years ago

I added a pull request to update the readme so the latest version of CSScomb works as an external tool for JetBrains editors (such as WebStorm, PhpStorm, and IntelliJ IDEA).

Here's the pull request: https://github.com/csscomb/jetbrains-csscomb/pull/7

Summary, thank you @Euheny :

euheny commented 7 years ago

i found it! -t, --tty-mode execution in TTY mode (useful, when running tool using external app, e.g. IDE)

maliyshock commented 7 years ago

guys, may be i will disappoint you. Css comb is useless, because he always put pseudo-elements and pseudo-classes to the bottom - it is rly not good, because it is rly important where i put that stuff

euheny commented 7 years ago

sorting define in config, and no - not sort :) pseudo-elements and pseudo-classes remain in place

maliyshock commented 7 years ago

Hmmm... can you share that for example? As i remember i tried that and it wont help.

euheny commented 7 years ago

@gabriensymons with -t any version is working @maliyshock try on online http://csscomb.com/online in my case very helpful for code style guide :)

gabriensymons commented 7 years ago

Thanks @Euheny! I updated my pull request with your discovery: #7

maliyshock commented 7 years ago

@Euheny he cant work with preprocessor syntax here http://csscomb.com/online

Im talking about that constructions. For example u use sass file with this code

.comb-me {
    &:after{
      display:inline block;
      content:'';
    }

    position:relative;
}

So if u comb it, u get somthing like this

.comb-me {
    position:relative;

    &:after{
      display:inline block;
      content:'';
    }
}
euheny commented 7 years ago

@maliyshock Hm. Did not think about this case. In our code-style all 'block' go after main rules.

includes extends styles pseudo nesting content mixins media mixins

@gabriensymons you're welcome

in my case:

forrest-lee commented 7 years ago

@Euheny thx, $FilePath$ -v - it's works for me

prosim commented 6 years ago

@Euheny - second that thx - $FilePath$ -v -t was the thing that worked for me as well - nothing else was working.

YiqinZhao commented 6 years ago

Tested on PyCharm 2017.2, CSScomb 4.2.0. -t $FilePath$ doesn't work, but $FilePath$ -t works. I hope someone could update the document for this little problem.

Alecto commented 6 years ago

stop working in phpstorm 2017.3.3 https://image.prntscr.com/image/dbwJm2XXTTez1qIGEN0aGA.png there are no errors, but sorting is not performed.

YiqinZhao commented 6 years ago

@Alecto Confirmed and reproduced on WebStorm 2017.3.3, csscomb 4.2.0

But I don't think it is an error related to IDE itself. I have a global configuration file at ~/.csscomb.json, after removing this file, csscomb works again.

Are you using the configuration files in official repo? It seems that the official configs caused this problem.

Try remove that, then generate new configuration files online.

Alecto commented 6 years ago

@HawkinsZhao, thank U. I did what you advised. generated a new file .csscomb.json https://image.prntscr.com/image/N-TWxqXwRZaOkt-_5bSx4Q.png also I tried to delete .csscomb.json the result remained unchanged, the properties are not sorted, the scss file where I run csscomb - does not change at all.

YiqinZhao commented 6 years ago

@Alecto Hi, I can't reproduce, can you give me a sample of your scss file?

Aslo, try using csscomb in command line, check if csscomb work properly.Maybe there should be some OS related problems troubling you? I'm using macOS 10.13.3, I'm not familiar with Windows.

Alecto commented 6 years ago

scss files?

https://drive.google.com/file/d/1sVhmBfkmEC_kPdmjw3W2K8TmzoXN9yOq/view?usp=sharing Now they are sorted using npm-csscomb + gulp (plz change position of css properties and try any _*.scss), I do not think they have a problem.

YiqinZhao commented 6 years ago

@Alecto That's curious. csscomb works fine with these scss files on my machine.🤔

Alecto commented 6 years ago

could you show me, please, your settings of the csscomb in phpstrom (screen) and send me your .csscomb.json as is, please? and maybe version? i use global +-- csscomb@4.2.0

YiqinZhao commented 6 years ago

Here it is:

{
    "remove-empty-rulesets": true,
    "always-semicolon": true,
    "color-case": "upper",
    "block-indent": "    ",
    "color-shorthand": false,
    "element-case": "lower",
    "eof-newline": true,
    "leading-zero": true,
    "quotes": "single",
    "sort-order-fallback": "abc",
    "space-before-colon": "",
    "space-after-colon": " ",
    "space-before-combinator": " ",
    "space-after-combinator": " ",
    "space-between-declarations": "\n",
    "space-before-opening-brace": " ",
    "space-after-opening-brace": "\n",
    "space-after-selector-delimiter": " ",
    "space-before-selector-delimiter": "",
    "space-before-closing-brace": "\n",
    "strip-spaces": true,
    "tab-size": true,
    "unitless-zero": true
}

Alecto commented 6 years ago

the same, but i have to use .....csscomb.cmd if ....csscomb - i have error.

in any case - nothing happened ((

I think there are problems in the version of phpstorm. now installed 2017.3.3. when it was 2017.2.4 - everything worked.

YiqinZhao commented 6 years ago

OK... That's so sad.