C
C
copal2016-03-22 13:19:02
Sass
copal, 2016-03-22 13:19:02

How to speed up sass compilation?

When there are more than ten .sass files, compilation starts to take more than one minute.
Compiling with gulp-sass. the first thing that came to mind was to connect gulp-newer, but the following problems appear with it ... The .sassentry point is main.sass, which imports all other files into itself. And when I compile only the changed files, then changes occur in a separate file, but main.cssnot in the merged one.
Is there a way out of this situation?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Amir Gafurov, 2016-03-22
@amir73911

It looks like you misorganized the file structure. By the way, in my projects, on average, there are 30-40 files (components and blocks, all in separate files) and compilation takes no more than 2 seconds.
The entry point is the main.sass file, it only contains file imports.
Check the organization of gulp tasks.
PS: assembly for working with Gulp, Sass, Foundation. Compare gullfiles, I hope it will help speed up the process.

A
Alexey Ukolov, 2016-03-22
@alexey-m-ukolov

Use libsass, not ruby ​​gem.
But in general, even when using the ruby ​​version, a minute is an incredibly long time. In our Ruby project with a customized Foundation, compass and hundreds of files connected, it took 20 seconds in the worst case.

T
timfcsm, 2016-04-05
@timfcsm

I had some brakes when I used the includePaths parameter, with each new file a second was added to the compilation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question