Giter Club home page Giter Club logo

ssr-to-html's Introduction


ssr-to-html
TypeScript Styled with prettier Build status NPM Version Downloads

Crawl a server rendered application and output html files.

Installation & Usage

Globally

npm

# Install
npm install ssr-to-html -g

# Use
ssr-to-html <options>

Locally

npm

# Install
npm install ssr-to-html

# Use with npm 7
npm exec -- ssr-to-html <options>

# Use with npm <6
npx ssr-to-html <options>

yarn

# Install
yarn install ssr-to-html

# Use
yarn ssr-to-html <options>

Examples (assuming globally installed)

$ ssr-to-html --out ./dist -- npm start

The above will execute the npm start command and wait for a server to begin listening. Once the server has started, we crawl the site starting from / and output .html files in the ./dist directory.

Options

Option Details
--out, -o The directory that the ".html" files will be written to.
--port The port of the server to connect to. This also sets "process.env.PORT". (default to a random available port)
--wait The total amount of time in ms to wait for the server to start on the specified port. Setting to 0 will disable this timeout. (default 30000)
--path, -p An additional path to crawl. (default will crawl from /)
--404 The path to the 404 page. (default /404/)
--help, -h Shows helpful information.

Code of Conduct

This project adheres to the eBay Code of Conduct. By participating in this project you agree to abide by its terms.

ssr-to-html's People

Contributors

dylanpiercey avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.