Skip to content

pkerschbaum/pkerschbaum-homepage

Repository files navigation

pkerschbaum.com

Development

Prerequisites

  • Node.js: It is recommended to use nvm and run nvm use, this will automatically switch to the Node.js version mentioned in the file .nvmrc.
    Alternatively you can install Node.js directly, please refer to .nvmrc of this project to determine the Node.js version to use.

  • pnpm: This monorepo ("workspace") uses pnpm as package manager.
    It is recommended to use corepack of Node.js, just run:

    corepack enable

    pnpm commands should now be available (and the pnpm version specified in package.json#packageManager will be automatically used).

  • Toolchain for native Node.js modules: Run the installation instructions "A C/C++ compiler tool chain for your platform" of microsoft/vscode/wiki/How-to-Contribute#prerequisites.

Code Organization

Build & Run

  1. Install all dependencies:

    pnpm install
  2. Run an initial build:

    pnpm run build
  3. Run watcher for the libraries:

    pnpm dev
  4. Start a local instance of @pkerschbaum-homepage/web:

    pnpm --filter=web run dev

Additional commands for development

See scripts of ./package.json for available scripts in the workspace.

To fetch the favicons for all articles, run internal:fetch-favicons and internal:generate-css-modules in ./apps/web.

Note: This command will also run Puppeteer.
If you have some errors with Puppeteer, like "error while loading shared libraries: libatk-1.0.so.0", make sure you have installed all dependencies on your system necessary to run Puppeteer/Chrome.
One way to get all dependencies is to just install Chrome. For Ubuntu, execute this command in a temporary directory:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb
See also this link for more information: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md.

Updating TypeScript

So to update TypeScript to a new version, do this:

  1. Remove current patch:

    pnpm patch-remove typescript@5.3.3 # <-- look this up in package.json#pnpm#patchedDependencies
  2. Update typescript everywhere:

    pnpm -r update typescript@5.4.4 # <-- new version here
  3. Use the new version in the script create-pnpm-patch-via-ts-patch of the root package.json ./package.json.

  4. Run:

    pnpm run create-pnpm-patch-via-ts-patch

About

pkerschbaum.com built with Next.js, Linaria, mdx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published