Wednesday, 10 May 2017

Syntax for setting options in Juice package methods

I want to use Juice to inline my css. I'm not sure what the correct way to implement the options object param is.

juice.juiceResources(html, options, callback) 

This is what I've got so far.

 juice.juiceFile(path, <what is correct syntax for options object> , function(err, html) {
        if(err) {
          console.log('Juice error :: ', err);
        }
          console.log(html);
      });

The docs say all the methods take an options object but I can't find any actual examples of how it should be constructed. Any help or pointers to actual code examples appreciated!



via mikeym

No comments:

Post a Comment