majodev / metalsmith-data-markdown

A Metalsmith plugin to use markdown content within html tags via data-markdown attribute
http://ranf.tl/2014/10/01/extracting-libs-from-a-node-js-project/
14 stars 4 forks source link

question about setImmediate #2

Closed unstoppablecarl closed 9 years ago

unstoppablecarl commented 10 years ago

I have never used setImmediate. After reading up on setImmediate It seems to make sense to use it here (I am not confident I understand exactly what it does without having used it). As far as I know there are no other metalsmith plugins that use this.

Can you explain why you have it? or maybe why no one else has?

majodev commented 10 years ago

setImmediate was used to yield a given function (done() in the case of metalsmith). Since metalsmith went to 1.0.0 recently, support for Synchronous Plugins was introduced and this behavior is actually no longer needed.

However, I'm not quite sure if these statements should be dropped, as older metalsmith version might not work without it.

PS: The skeleton i used was quite the standard back then, e.g. metalsmith-ignore and markdown have setImmediate in it.