All Projects → prisma-archive → Prep

prisma-archive / Prep

Licence: mit
Pre-renders your web app (React, Vue, Angular, ...) into static HTML based on your specified routes enabling SEO for single page applications.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Prep

React Snap
👻 Zero-configuration framework-agnostic static prerendering for SPAs
Stars: ✭ 4,565 (+1130.46%)
Mutual labels:  seo, server-side-rendering, prerender
React Fullstack Graphql
Starter projects for fullstack applications based on React & GraphQL.
Stars: ✭ 1,352 (+264.42%)
Mutual labels:  apollographql, graphcool
Booben
Web app constructor based on React, with GraphQL bindings
Stars: ✭ 96 (-74.12%)
Mutual labels:  apollographql, graphcool
pokedex-react
A Pokedex App using and teaching Apollo and React
Stars: ✭ 47 (-87.33%)
Mutual labels:  apollographql, graphcool
Graphql Up
Get a ready-to-use GraphQL API for your schema
Stars: ✭ 415 (+11.86%)
Mutual labels:  apollographql, graphcool
Learnapollo
👩🏻‍🏫 Learn Apollo - A hands-on tutorial for Apollo GraphQL Client (created by Graphcool)
Stars: ✭ 5,274 (+1321.56%)
Mutual labels:  apollographql, graphcool
ios-graphql
iOS code examples with GraphQL, Apollo & more
Stars: ✭ 78 (-78.98%)
Mutual labels:  apollographql, graphcool
Prerender Java
java framework for prerender
Stars: ✭ 115 (-69%)
Mutual labels:  seo, prerender
server-render-javascript
Prerender your javascript web page for better seo with PhantomJS. ⚠️ no es6 supported.
Stars: ✭ 12 (-96.77%)
Mutual labels:  seo, prerender
react-ssr-starter
🔥 ⚛️ A React boilerplate for a universal web app with a highly scalable, offline-first foundation and our focus on performance and best practices.
Stars: ✭ 40 (-89.22%)
Mutual labels:  seo, server-side-rendering
parcel-plugin-prerender
No description or website provided.
Stars: ✭ 42 (-88.68%)
Mutual labels:  seo, prerender
Vuesion
Vuesion is a boilerplate that helps product teams build faster than ever with fewer headaches and modern best practices across engineering & design.
Stars: ✭ 2,510 (+576.55%)
Mutual labels:  seo, server-side-rendering
Rendora
dynamic server-side rendering using headless Chrome to effortlessly solve the SEO problem for modern javascript websites
Stars: ✭ 1,853 (+399.46%)
Mutual labels:  seo, server-side-rendering
Angular Fullstack Graphql
🚀 Starter projects for fullstack applications based on Angular & GraphQL.
Stars: ✭ 92 (-75.2%)
Mutual labels:  apollographql, graphcool
Vue Seo Prerender
Vue.js Tutorial: A Prerendered, SEO-Friendly Example
Stars: ✭ 139 (-62.53%)
Mutual labels:  seo, prerender
universal-react-relay-starter-kit
A starter kit for React in combination with Relay including a GraphQL server, server side rendering, code splitting, i18n, SEO.
Stars: ✭ 14 (-96.23%)
Mutual labels:  seo, server-side-rendering
react-seo-friendly-spa-template
React PWA/SPA template initially scaffolded with CRA (Create React App) and configured for SEO. Makes use of prerendering and other techniques/packages in order to achieve a perfect "Lighthouse Score".
Stars: ✭ 24 (-93.53%)
Mutual labels:  seo, prerender
Usus
Webpage pre-rendering service. ⚡️
Stars: ✭ 804 (+116.71%)
Mutual labels:  seo, prerender
Prerender Spa Plugin
Prerenders static HTML in a single-page application.
Stars: ✭ 7,018 (+1791.64%)
Mutual labels:  seo, prerender
vue-seo-friendly-spa-template
Vue.js PWA/SPA template initially scaffolded with vue-cli and configured for SEO. Makes use of prerendering and other techniques/packages in order to achieve a perfect "Lighthouse Score".
Stars: ✭ 41 (-88.95%)
Mutual labels:  seo, prerender

prep has been deprecated in favor of newer tools like Gatsby and Next.js

prep npm version

Pre-renders your web app into static HTML based on your specified routes enabling SEO for single page applications.

NOTE: prep is now based on Chromeless. We'll shortly release an updated version.

Features

  • 🔎 Makes your single page app SEO friendly
  • 🚀 Improves loading speed up to 400x
  • ✨ Incredibly flexible and easy to use
  • 📦 Works out-of-the-box with any framework (React, Angular, Backbone...). No code-changes needed.

Install

npm install -g prep

Usage

Just run prep in your terminal or add it to the scripts as part of your build step in your package.json. If you don't provide a target-dir the contents of the source-dir will be overwritten.

  Usage: prep [options] <source-dir> [target-dir]

  Options:

    -h, --help           output usage information
    -c, --config [path]  Config file (Default: prep.js)
    -p, --port [port]    Phantom server port (Default: 45678)

In order to configure the routes which you'd like to pre-render you need to specifiy them in a Javascript config file with the following schema. If you don't provide a config file, prep will just pre-render the / route.

const defaultConfig = {
  routes: ['/'],
  timeout: 1000,
  dimensions: {
    width: 1440,
    height: 900,
  },
  https: false,
  hostname: 'http://localhost',
  useragent: 'Prep',
  minify: false,
  concurrency: 4,
  additionalSitemapUrls: [],
}
  • routes specifies the list of routes that the renderer should pass. (Default: ['/'])
  • timeout is the timeout for how long the renderer should wait for network requests. (Default: 1000)
  • dimensions the page dimensions in pixels that the renderer should use to render the site. (Default: 1440 x 900)
  • https prep uses https if true otherwise http
  • hostname is used to show the correct urls in the generated sitemap that is stored in [target-dir]/sitemap.xml
  • useragent is set a navigator.userAgent
  • minify is a boolean or a html-minifier configuration object.
  • concurrency controls how many routes are pre-rendered in parallel. (Default: 4)
  • additionalSitemapUrls is a list of URLs to include as well to the generated sitemap.xml. (Default: [])

Example prep.js

There are three different ways to configure prep. Which one you pick depends on your use case.

1. Javascript Object

The probably easiest way is to export a simple Javascript object.

exports.default = {
  routes: [
    '/',
    '/world'
  ]
}

2. Synchronous Function

You can also return a function that returns the config for prep.

exports.default = () => {
  return {
    routes: [
      '/',
      '/world'
    ]
  }
}

3. Asynchronous Function (Promise)

Furthermore you can also return a Promise or use ES7 features such as async & await (Babel pre-compile step needed).

export default async () => {
  const routes = await getRoutesAsync()
  return { routes }
}

How it works

The concept behind prep is very simple. prep starts a temporary local webserver and opens your provided routes via PhantomJS. Each route will be exported as a static HTML file. The resulting folder structure is the same as the structure of your routes.

Known Issues

  • If you want to use Object.assign() in your code, please add a polyfill like phantomjs-polyfill-object-assign, because prep uses PhantomJS, which doesn't support Object.assign() yet.

Help & Community Slack Status

Join our Slack community if you run into issues or have questions. We love talking to you!

Prisma

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].