Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Reapp | 3,511 | 3 | 1 | 7 years ago | 79 | May 13, 2015 | 39 | mit | JavaScript | |
[deprecated!] Make hybrid mobile apps with power | ||||||||||
Compound | 1,617 | 101 | 22 | 6 years ago | 89 | July 06, 2016 | 47 | JavaScript | ||
MVC framework. Built on Node.JS. Works on server and browser. | ||||||||||
Flatiron | 1,344 | 1,989 | 136 | 6 years ago | 44 | December 16, 2014 | 17 | mit | JavaScript | |
framework components for node.js and the browser | ||||||||||
Ember App Kit | 1,044 | 7 years ago | 2 | November 10, 2018 | 8 | mit | JavaScript | |||
deprecated: see https://github.com/stefanpenner/ember-cli | ||||||||||
Pretty Routes | 612 | a year ago | 6 | May 03, 2021 | mit | PHP | ||||
Display your Laravel routes in the console, but make it pretty. 😎 | ||||||||||
Ovpm | 266 | 2 years ago | 32 | April 27, 2021 | 15 | agpl-3.0 | Go | |||
OpenVPN Management Server - Effortless and free OpenVPN server administration | ||||||||||
Vue Cli Plugin Prerender Spa | 163 | 16 | 6 | 2 years ago | 11 | July 25, 2019 | 38 | mit | JavaScript | |
Boost SEO by prerendering your Vue application. Powered by prerender-spa-plugin. | ||||||||||
Hn Polymer 2 | 158 | 5 years ago | 11 | HTML | ||||||
Polymer Hacker News clone | ||||||||||
Angular Prerender | 125 | 2 | 5 days ago | 288 | August 02, 2022 | 5 | mit | JavaScript | ||
A command line tool to prerender Angular Apps. | ||||||||||
Weave | 118 | 3 years ago | 6 | mit | Rust | |||||
A simple CLI router for wiring together several sources behind a single HTTP endpoint |
Pre-render static websites with ease.
Antedate is a simple API and CLI that uses Chrome pupeteer to pre-render client-side websites. It automatically spins up a local server and renders each route provided.
$ npm install antedate
You can either use the API or CLI.
$ antedate render -r /home -r /about
import antedate from 'antedate'
const routes = ['/', '/about', '/contact'];
const site = './site';
await antedate(site, routes);
// => [
// { html: '....', route: '/', path: '/index.html' },
// { html: '....', route: '/about', path: '/about.html' }
// ...
// ]
await antedate(site, routes, { headless: false, dirs: true });
// => [
// { html: '....', route: '/', path: '/index.html' },
// { html: '....', route: '/about', path: '/about/index.html' }
// ...
// ]
The module also comes with an CLI
Description
Pre-render the routes given
Usage
$ antedate render [options]
Options
-s, --selector Wait for the following selector before rendering
-w, --wait MS to wait before saving page. Happens after selector wait
-r, --route Prerender the route specified
-d, --dir Directory containing the static site (default .)
-o, --output Output directory (default ./static)
-h, --help Displays this message
Examples
$ antedate render -r /home -r /about
Returns: Array
Returns a rendering function that will optionally accept a date
value as its only argument.
Type: String
Required: true
Path to the directory containing the static site to pre-render. Antedate automatically starts a local server.
Type: Array
Required: true
Array of routes to be rendered. The root /
is always rendered last.
E.g. ['/about', '/contact', '/']
.
Type: Object
Required: false
Type: Boolean
Default: false
Wether to run puppeteer in headless mode.
Type: String
Default: ``
Wait for selector
to appear before rendering the site. E.g. body.prerender
.
Type: Number
Default: ``
Milliseconds to before rendering the site.
OBS: This happens after the selector option if both are provided.
Type: Function
Default: ``
A callback function to execute on the page before the rendering happens.
Type: Function
Default: ``
A decorator function that allows you to manupulate the rendered HTML string.
await antedate(site, routes, { decorator: html => html.toUpperCase()});
The idea and logic is based on code from PWA by Luke Edwards. See original implementation in build.js in @pwa/cli.