Modern Frontend Development Practices
Docs: https://todomvc-once-more.vercel.app/
This project use pnpm workspace to manage the code. pnpm is an npm alternative.
curl -fsSL https://get.pnpm.io/install.sh | sh -then install all packages dependencies
pnpm install # just like `npm install` but recursively in the workspaceEach example in the examples/ folder is an isolated project. They are simply generated by cli (e.g. npx create-react-app my-app, vue create hello-world, pnpm create vite my-app).
cd examples/vite-react-recoil
pnpm run dev
pnpm run buildor run with pnpm filter at root dir
pnpm --filter ./examples/vite-react-recoil dev -- --port 3302Every example should have a
meta.jsfile for the project description propose
Build the entire website
pnpm build # build everything in order
# or separated steps
pnpm build:examples # build every app in `examples/`
pnpm build:website # build these below
pnpm build:data # analyze every example: cloc, meta, etc..
pnpm build:static # build website pages
pnpm build:ssr # build example layout function for injection
pnpm build:inject # inject every example html with data and description
# preview the built website
pnpm previewif you see some error like this:
../../node_modules/.pnpm/@[email protected]/node_modules/@types/react/index.d.ts:3311:13 - error TS2717: Subsequent property declarations must have the same type.It's a TypeScript + node_modules problem (Multiple references to the same type definitions),
Try set this in the tsconfig.json in the relative sub projects
"skipLibCheck": true,