piperhaywood / ephemera.sambaldwin.info

Home Page:ephemera-web-piper.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ephemera

This is a Turbo monorepo for a WIP website housing an ephemera collection by Sam Baldwin, built by Piper Haywood. Public URL coming soon.

Currently, Turbo is pinned to v1.10.4 because of this issue. Runs on node v18.6.0, see .nvmrc.

The packages and apps in this monorepo include:

  • apps/web: A Next.js site that displays the content
  • packages/studio: The Sanity Studio used to edit this content

Before setting up Turbo, I used this Sanity blog tutorial and the Next.js blog example using Sanity as the starting points for this project before setting up Turbo.

Getting started

Ensure that you have pnpm installed locally (see docs), then install all dependencies by running pnpm i from the root.

Deployment

This site is hosted on Vercel and will automatically deploy every time a change is pushed to main.

Besides this, to ensure that relatively up-to-date Sanity-hosted content is shown at all times, the main branch build is deployed once an hour via a GitHub Actions workflow that triggers a Vercel deploy hook. If you have repo access, see Settings -> Secrets and Variables -> Actions for the VERCEL_DEPLOY repository secret.

Development

Available Scripts, /apps/web

In the web app directory, you can run:

pnpm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

pnpm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

pnpm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

pnpm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Available scripts, /packages/studio

In the Sanity Studio directory, you can run pnpm start to get Sanity Studio up and running in your browser, or pnpm build to build the Studio.

About

ephemera-web-piper.vercel.app


Languages

Language:JavaScript 93.2%Language:CSS 6.8%