theKashey / used-styles

📝All the critical styles you've used to render a page.
MIT License
138 stars 9 forks source link

renderToNodeStream example #17

Closed sayjeyhi closed 4 years ago

sayjeyhi commented 4 years ago

In Readme file you mentioned using of this Readable :

// small utility for "readable" streams
const readable = () => {
  const s = new Readable();
  s._read = () => true;
  return s;
};

But there is no usage for this variable , is it correct?

theKashey commented 4 years ago

You can find MUCH simpler examples in this PR https://github.com/theKashey/used-styles/pull/16

theKashey commented 4 years ago

yep, it should be readableString, used later in the code.

sayjeyhi commented 4 years ago

@theKashey actually in that example createStyleStream first parameter is htmlStream but even in 2.1.1 version createStyleStream first argument is style definition !

theKashey commented 4 years ago

It sounds like I should extract examples out of the README to keep them type-able, and synchronize their content back the readme, so it would be always up-to-date. Not like it is right now :(