marotte
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

marotte

A CLI utility to statically prerender your dynamic front-end apps, using Puppeteer & Express

Splash

Borne out of annoyance with the overkill of using full SSR for small projects, and the difficulty of getting framework-specific static prerendering tools working the way I wanted, marotte is a Puppeteer-based, framework-agnostic CLI app to statically prerender a front-end app. Since it's a CLI app, one can easily add 'marotte render' to their npm build script & have it run whenever you build.

Usage

npm i -D marotte
marotte init
marotte render

Commands

render

This command statically prerenders your application by firing up an Express instance to host it, crawling it with Puppeteer, and writing the html content of the pages it finds to disk at the appropriate path.

> marotte render --help

Usage: render|r [options]

Statically prerender the application

Options:

  -w, --workingdir [dir]  Working directory for project [processs.cwd()]
  -d, --dist [dir]        Distribution subdirectory for project [./dist]
  -p, --port [port]       Port to host Express on [4000]
  -h, --help              output usage information

init

This command will walk you through setting up a config file.

Package Sidebar

Install

npm i marotte

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

58.1 kB

Total Files

27

Last publish

Collaborators

  • vivshaw