Skip to content

chrstntdd/dicephrase

Repository files navigation

Dicephrase

About

Instead of repeating myself — read about the project here.

Prerequisites

First steps

  1. Install all dependencies
$ pnpm i

Development

Main web app

From the root of the repo, you can run the dev script by filtering to start the vite dev server.

$ pnpm -F ./apps/www dev

Building

Build the main web app

$ pnpm -F ./apps/www build

This script performs a few key steps:

  1. Builds the app in vite's ssg mode to a single plain JS file
  2. Builds the app using vite for browser based environments
  3. Builds a ServiceWorker using esbuild
  4. Pre-renders the app to plain HTML using the ssg assets
  5. Copies the _headers file to dist
  6. Optimizes the HTML using critical to inline styles into the document head (to prevent FOUC) and finally minifies the whole file

Running Tests

E2E

  1. Build the main web app
$ pnpm -F ./apps/www build
  1. Run a local web server to serve the static content
$ pnpm -F ./apps/www preview
  1. Run Playwright
$ pnpm -F ./apps/e2e test

Unit

We only have unit tests for the pure functions in the gen-utils pkg. The UI is tested mainly by the E2E test for robustness, but also I couldn't get solid-testing-library to work 😕

  1. Run the tests!
$ pnpm -F ./pkgs/gen-utils test

About

Simple, random, and secure in-browser password generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published