Skip to content

Help Understanding the Preact Codebase and Dev Workflow #4758

Answered by JoviDeCroock
thamizh-root asked this question in Q&A
Discussion options

You must be logged in to vote

There are two ways to work in this repository, you have the demo/ folder which you can run npm i && npm run dev in. This will contain a live copy of the files within the repo so any console.log will show up. This is tested in browser etc as described in point 2.

Secondly you can develop through tests, in every repository you can just look at package.json.scripts to find out what commands you can run. npm run test:vitest is one of ours.

I personally debug libraries with demo/ and solve Preact specific issues with tests running, I write a new test and solve the issue.

  1. Where to start if i wanna learn the internals and understand the codebase?

it's a small code base, starting from the sta…

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by JoviDeCroock
Comment options

You must be logged in to vote
1 reply
@JoviDeCroock
Comment options

Comment options

You must be logged in to vote
5 replies
@JoviDeCroock
Comment options

@thamizh-root
Comment options

@marvinhagemeister
Comment options

@thamizh-root
Comment options

@JoviDeCroock
Comment options

Comment options

You must be logged in to vote
2 replies
@JoviDeCroock
Comment options

@thamizh-root
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4757 on May 07, 2025 13:13.