| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
All contributions are welcome
The site is a Vite + React app. Requires a current Node (18+).
yarn install
yarn dev # dev server on http://localhost:3000
yarn build # production build into dist/
yarn preview # serve the production build locally
yarn deploy # build and publish dist/ to the gh-pages branch (usually unnecessary, see below)Pushing to master deploys automatically: CI builds, smoke tests the build in a browser, and then publishes that same artifact to the gh-pages branch and waits for https://gpu.rocks to serve it. yarn deploy remains for publishing from a machine when needed.
Two checks run against a real browser (they use puppeteer-core, which does not download anything — set CHROME_PATH if Chrome is somewhere unusual):
yarn test:smoke # every route rendered, /api/ still served
yarn test:compare https://gpu.rocks http://localhost:4173 # diff two deploymentstest:smoke runs in CI on every push and pull request. It exists because a build can succeed and still ship a blank site — the move off create-react-app did exactly that until a missing global shim was found. test:compare is a manual tool for changes that should not alter the site, such as a build tool swap or a dependency bump; it diffs the rendered text, links and images of two deployments.
Everything in public/ is copied verbatim into the build — that includes api/ (the generated gpu.js API reference served at https://gpu.rocks/api/), 404.html (forwards deep links to the hash routes), and CNAME.
Note public/service-worker.js is deliberately a no-op that unregisters itself: the site used to ship a create-react-app service worker whose navigation fallback served the app shell for every extension-less path, so /api/ rendered the homepage (gpujs/gpu.js#852). Keep the file so browsers still holding the old worker tear it down.
| Back | FazBrowse Home | New Git URL |