mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-12-03 10:00:31 +03:00
* fix: Undeclared dependencies Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * chore: Rationalize package versions Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * chore: Remove old react app remnants Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * feat: Conversion to pnpm Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Circular deps #0 Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: common package circular dependencies Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * chore: Move history and undo/redo to excalidraw/excalidraw Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * feat: AppState broken up across package boundaries Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: renderElement and binding type racionalization Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Refactor linearElementEditor to not use types outside the package Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * chore: Do not import self barrel file Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: All circular dependencies except core Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * feat: Bump pnpm to 11 Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: SASS deprecation warnings Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Polynomial regular expression used on uncontrolled data Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Vercel deploy Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * feat: excalidraw/history package Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: Polynomial regex in SVG payload decoding Signed-off-by: Mark Tolmacs <mark@lazycat.hu> * fix: emit the internal packages' types from the editor again The editor advertises ./common/*, ./element/*, ./history/*, ./math/* and ./utils/* type subpaths, but without the path aliases tsc treats those packages as external libraries and no longer emits them. Include their sources in the editor's type build, and drop the relative cross-package import that made element/ come out half-emitted. * feat: export the history classes of the editor's API from the entry onIncrement hands out StoreIncrement subclasses and applyDeltas takes StoreDelta, so export them next to CaptureUpdateAction. Hosts then need no dependency of their own on @excalidraw/history. * chore: refuse to publish packages with npm or yarn Only pnpm publish rewrites workspace:* dependencies and applies publishConfig.exports, so a package published with another client can't be installed. --------- Signed-off-by: Mark Tolmacs <mark@lazycat.hu> Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
97 lines
1.9 KiB
Plaintext
97 lines
1.9 KiB
Plaintext
# Development
|
|
|
|
## Local Installation
|
|
|
|
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
|
|
|
|
### Requirements
|
|
|
|
- [Node.js](https://nodejs.org/en/)
|
|
- [pnpm](https://pnpm.io/installation): run `corepack enable` (Corepack ships with Node.js) to use the version pinned in `package.json`
|
|
- [Git](https://git-scm.com/downloads)
|
|
|
|
### Clone the repo
|
|
|
|
```bash
|
|
git clone https://github.com/excalidraw/excalidraw.git
|
|
```
|
|
|
|
### Install the dependencies
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
### Start the server
|
|
|
|
```bash
|
|
pnpm start
|
|
```
|
|
|
|
Now you can open [http://localhost:3000](http://localhost:3000) and start coding in your favorite code editor.
|
|
|
|
## Collaboration
|
|
|
|
For collaboration, you will need to set up [collab server](https://github.com/excalidraw/excalidraw-room) in local.
|
|
|
|
## Commands
|
|
|
|
### Install the dependencies
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
### Run the project
|
|
|
|
```bash
|
|
pnpm start
|
|
```
|
|
|
|
### Reformat all files with Prettier
|
|
|
|
```bash
|
|
pnpm fix
|
|
```
|
|
|
|
### Run tests
|
|
|
|
```bash
|
|
pnpm test
|
|
```
|
|
|
|
### Update test snapshots
|
|
|
|
```bash
|
|
pnpm test:update
|
|
```
|
|
|
|
### Test for formatting with Prettier
|
|
|
|
```bash
|
|
pnpm test:code
|
|
```
|
|
|
|
### Docker Compose
|
|
|
|
You can use docker-compose to work on Excalidraw locally if you don't want to setup a Node.js env.
|
|
|
|
```bash
|
|
docker-compose up --build -d
|
|
```
|
|
|
|
## Self-hosting
|
|
|
|
We publish a Docker image with the Excalidraw client at [excalidraw/excalidraw](https://hub.docker.com/r/excalidraw/excalidraw). You can use it to self-host your own client under your own domain, on Kubernetes, AWS ECS, etc.
|
|
|
|
```bash
|
|
docker build -t excalidraw/excalidraw .
|
|
docker run --rm -dit --name excalidraw -p 5000:80 excalidraw/excalidraw:latest
|
|
```
|
|
|
|
The Docker image is free of analytics and other tracking libraries.
|
|
|
|
**At the moment, self-hosting your own instance doesn't support sharing or collaboration features.**
|
|
|
|
We are working towards providing a full-fledged solution for self-hosting your own Excalidraw.
|