piaskowyk / stateofX

Monorepo containing the State of JS apps

Home Page:surveyform-sigma.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monorepo

Run scripts with Just

Just is similar to NPM scripts or makefile, but language agnostic, simple and powerful.

Recommended installation with asdf:

asdf plugin add just
asdf install just latest
asdf global just latest

You might need to create the relevant .tool-versions files, that defines the version of Node used by asdf (similarly to what .nvmrc do for NVM).

  • Run redis (for external and internal API): just redis
  • Run mongo (for Next and APIs): just mongo

Pnpm with Corepack

The monorepo uses PNPM as its primary package manager.

Since we rely on Node 16+, you can use yarn and pnpm by enabling the Corepack feature of Node:

# If you have Node 16 installed, this will just work
corepack enable

Caveats with pnpm

  • If you import a subdependency of a direct dependency, you need to install it explicitelyas well. For example, apollo-server-express depens on apollo-server-core. But if you want to use apollo-server-core directly in your code, it must be installed. Yarn and NPM were more flexible (but also less reliable).
  • The node_modules folder structure is altered. This might trick Webpack cache (see the PNPM plugin used for Gatsby) and also our Apollo patch. Subdependencies are located in node_modules/.pnpm/node_modules, only direct dependencies of the project are located in node_modules (but they also link towards PNPM shared cache)
  • You need preserveSymlinks: true in tsconfig.

About

Monorepo containing the State of JS apps

surveyform-sigma.vercel.app

License:Other


Languages

Language:TypeScript 51.4%Language:JavaScript 37.7%Language:SCSS 10.0%Language:Astro 0.4%Language:HTML 0.3%Language:CSS 0.1%Language:Shell 0.1%Language:Dockerfile 0.0%