jonkemp / inline-css

Inline css into an html file.
MIT License
429 stars 85 forks source link

expected #124

Open vituchon opened 1 year ago

vituchon commented 1 year ago

Hi there! How you doing? Hope you are fine!

I tried making a simple app like this

var extractCss = require('extract-css');
var options = {
      url: './',
      applyStyleTags: true,
      removeStyleTags: true,
      applyLinkTags: true,
      removeLinkTags: true,
      preserveMediaQueries: false
  };

var document = `<div style="height: 100%;">
  <span style="height: 100%;"> </span>
</div>`
extractCss(document, options, function (err, html, css) {
    //console.log(html);
    console.log(css);
}); 

And there is no output..

image

I read the README.md and see some HTML in the expected folder... but got no more clues about how to make this work,.

Would you be so kind of providing some working examples?

Greetings

Thanks.

jonkemp commented 1 year ago

You probably need to specify the file. It may not know which file to look for with just the forward slash.