C-Lodder / grunt-postcss

Apply several post-processors to your CSS using PostCSS.
MIT License
39 stars 7 forks source link

Add sequential options which allows process files one after another #6

Closed VitaliyR closed 5 years ago

VitaliyR commented 5 years ago

Hi!

Using grunt-postcss on a big project with a lot of CSS files (about 130 CSS files with 40MB total size) could cause memory out the problem because of running processors in async mode.

This PR contains the possibility to switch that mode to sync - so CSS files would be processed one after another, sequentially. It also saves a lot of RAM - GC will correctly find and kill that already processed files stuffs (source code, result object etc).

By default, this option set to false, so nothing will be changed for projects already using it.

P.S. Moved from original repo (https://github.com/nDmitry/grunt-postcss/pull/105) because it is abandoned.

C-Lodder commented 5 years ago

Thank you @VitaliyR