concordusapps / grunt-haml

Process HAML templates to precompiled JavaScript or rendered HTML.
https://npmjs.org/package/grunt-haml
MIT License
41 stars 28 forks source link

Add `batchLimit` option #35

Open artch opened 9 years ago

artch commented 9 years ago

When running the task against big amount of .haml files it creates the same amount of async processes. Say, 1000 files spawns 1000 ruby processes when used with ruby command. That easily consumes all the available machine's memory and fails.

This PR adds support of async.eachLimit function which limits the concurrent amount of async processes; and batchLimit option to configure it.