Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State of the project #23

Closed
stereobooster opened this issue Oct 24, 2017 · 1 comment
Closed

State of the project #23

stereobooster opened this issue Oct 24, 2017 · 1 comment

Comments

@stereobooster
Copy link
Collaborator

stereobooster commented Oct 24, 2017

The goal is to expand the tooling with all the bells and whistles that penthouse and critical etc. has. Including NPM packaging, split between lib and cli, unit tests, documentation, maturity.

There is react-snap which is basically doing what you describe. Do not pay attention to the name, it does not depend on React or create-react-app, but it uses create-react-app conventions. It can work with any Single Page Application to pre-render it to HTML. Plus it uses minimalcss to extract critical CSS and injects it directly in the page source and uses LoadCSS to load original CSS later. I feel like our projects can share some functionality and configurations.

There are also prep and react-snapshot, which can prerender, but does not do critical CSS magic.

@stereobooster
Copy link
Collaborator Author

// Note! This opens one URL at a time synchronous
  for (let i = 0; i < urls.length; i++) {
    const url = urls[i]
    // console.log(url, i);
    const page = await browser.newPage()

react-snap uses highland to process urls concurrently.

 queue
    .map(x => _(fetchPage(x)))
    .parallel(options.concurrency)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant