Re: Execute code after ReSpec finishes processing

Hey,

You can use either, but personally I'd go with `.postProcess` as it's intended exactly for what you describe. 

The difference is just that postProcess takes an array of functions and runs them in order. It also has slightly better error reporting if one of the functions fails. 

> On 14 Oct 2021, at 11:52 am, Fuqiao Xue <xfq@w3.org> wrote:
> 
> Hi,
> 
> I would like to execute some JavaScript functions after ReSpec finishes all its processing for one of my documents. I found these two methods:
> 
> * https://github.com/w3c/respec/wiki/postProcess
> * https://github.com/w3c/respec/wiki/document.respec#documentrespecisready
> 
> I wonder if there are differences between them? Or can I use either one?
> 
> Thanks,
> 
> Fuqiao
> 

Received on Thursday, 14 October 2021 02:29:43 UTC