Answer the question
In order to leave comments, you need to log in
Which css2 sass,scss,less compilers do you know?
Introduction
Set out to translate all projects to scss.
The task itself is voluminous and large and cannot be solved immediately.
I'm interested in the main thing, there are a lot of online css to *ss generators on the net, and they cope well, for initial optimization.
I have been doing layout for a long time, I know preprocessors at an average level.
So, in fact, css and the preprocessor language are quite simple, compared to js and php.
The logic can be complicated, however, if you use one of the methodologies, you can make a plugin with them, because a few regular expressions will allow us to collect variables for colors, fonts, images, and even a mixin.
While the problem is that there is not enough knowledge, 2-3 days of googling gives almost no results, we need advice and tips from experienced people.
During this time I managed to find the following projects:
https://github.com/skandasoft/css-sass-scss
https://github.com/sircus/process-css2scss
https://github.com/jxnblk/css-scss
https ://github.com/jpablobr/css2sass
https://github.com/jonschlinkert/grunt-refactor
I don't know which one is better written, I have to try everything.
I don’t want to get into the English-language Internet yet, but nevertheless, I found all the results from there, I couldn’t find any tutorials.
Not a lot of googling yet and I will know all the developers of node.js, ruby by name and in person (
at least the best ones.
I don’t want to contact them yet, but when the gaps are closed, I will ask them, consult.
Questions:
What css2 sass,scss,less compilers/plugins do you know?
Which one is the best?
Are there any tutorials or how to set it up?
Desirable open answer
So far 3 main questions
Answer the question
In order to leave comments, you need to log in
I personally use https://www.npmjs.com/package/node-sass aka on github https://github.com/sass/node-sass
This is the best I could find. Although I am not a big connoisseur and not a big fan of styles or browser-based layout in general, I have to choose packages from npm. Therefore, there are a couple of tips to eliminate long suffering and doubts, you need to adopt a system of formal criteria and measurable values, everything is better than choosing by vague intuitions:
1. The list of applicants can be made by search, articles, Habr, Stackoverflow and these resources: nodeframework.com https://github.com/sindresorhus/awesome-nodejs https://github.com/vndmtrx/awesome-nodejs
2. First, I compare by the number of stars in Github and NPM, by the number of downloads, by the age of the last commit and their total number, by contributors and what is done in pull requests and issues (how quickly bugs are fixed, do developers react to problems at all, all this is immediately visible). It is necessary to identify dead projects and discard them.
3. Then I put them on myself and compare the sources. The smaller the size of the sources and the nicer the style of the code, the better. I discard monsters that have huge repositories and dubious code. I leave the most concise or even minimalistic ones (I love minimalism). Well, for this particular case, you need to compare the results and the quality of the generated css.
4. After that I check for speed / performance. Why you need to do tests. In this case, you need to take an example of a more complex style scss file and run it through each library 1 million times and compare the numbers.
I do not see much difference in them, choose any and study. There is not enough time for everything, especially since they are 85% the same.
Set out to translate all projects to scss.
I'm building with gulp and I have gulp-sass in there . gulp-less is also available.
IMHO, the task does not make sense. I already understand new projects to do on the basis of the preprocessor. But why translate the old ones? Any CSS is quite a valid LESS for example. The maximum that can be really needed for old projects is to take the colors into variables and that's it, and then on the condition that you often have to climb into these projects and finish something.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question