Open maliyshock opened 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
@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.
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 :
-t
option in the parameters field.i found it! -t, --tty-mode execution in TTY mode (useful, when running tool using external app, e.g. IDE)
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
sorting define in config, and no - not sort :) pseudo-elements and pseudo-classes remain in place
Hmmm... can you share that for example? As i remember i tried that and it wont help.
@gabriensymons with -t any version is working @maliyshock try on online http://csscomb.com/online in my case very helpful for code style guide :)
Thanks @Euheny! I updated my pull request with your discovery: #7
@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:'';
}
}
@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:
@Euheny thx, $FilePath$ -v -
it's works for me
@Euheny - second that thx - $FilePath$ -v -t
was the thing that worked for me as well - nothing else was working.
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.
stop working in phpstorm 2017.3.3 https://image.prntscr.com/image/dbwJm2XXTTez1qIGEN0aGA.png there are no errors, but sorting is not performed.
@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.
@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.
@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.
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.
@Alecto That's curious. csscomb works fine with these scss files on my machine.🤔
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
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
}
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.
OK... That's so sad.
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