This is a monorepo containing the web sites, APIs, and related packages created by UiB-UB.
This Turborepo uses npm as a packages manager. It contains Next.js v13, Nuxt v3, and Sanity Studio v3.
It includes the following packages/apps:
api
: the API for the Special collection at the University of Bergen Library, a Next.js appchc-web
: the WIP Marcus website, a Next.js app and a Sanity Studio.chc-exh-nt-web
: the exhibition More than the humanitarian gaze, a Next.js app with a Sanity Studio.docs
: the documentation site, a Nextra applink-shortener
: WIP, a url redirect service with QR, a Next.js appsps-termportal-web
: Termportalen.no, a Nuxt.js appsps-termportal-admin
: termportalen-admin.vercel.app, a Nuxt.js app
eslint-preset-custom
: ESLint presettailwind-config
: shared tailwindcss configtailwind-ui
: React components with Tailwind CSS.termportal-ui
: Vue components with Tailwind CSStsconfig
: shared tsconfig.jsons used throughout the monorepoutils
: shared utility functions
Each package/app is aims to react 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
git clone ...
cd uib-ub-monorepo
To build all apps and packages, run the following command:
npm run build
To develop all apps and packages, run the following command:
npm run dev
Examples here use npm
, but this is easy to fudge up. Do not install packages directly in the apps or packages folders. Use the commands below. See Turborepo docs for more info.
- npm install
- npm install – Add package to root (mainly for devDependencies)
- npm install --workspace=
- npm install -w
- npm uninstall --workspace=
- npm update --workspace=
- npm run build - Build all packages and apps
- npm run dev - Develop all packages and apps
- npm run lint - Lint all packages
- npm run changeset - Generate a changeset
- npm run clean - Clean up all node_modules and dist folders (runs each package's clean script)
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo link
Learn more about the power of Turborepo: