1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00
Virtual whiteboard for sketching hand-drawn like diagrams
Go to file
Aakansha Doshi 48924688c7
build: migrate to Vite 🚀 (#6818)
* init

* add: vite dev build working

* fix: href serving from public

* feat: add ejs plugin

* feat: migrated env files and ejs templating

* chore: add types related to envs

* chore: add vite-env types

* feat: support vite pwa

* chore: upgrade vite pwa

* chore: pin node version to 16.18.1

* chore: preserve use of nodejs 14

* refactor: preserve REACT_APP as env prefix

* chore: support esm environment variables

* fix ts config

* use VITE prefix and remove vite-plugin-env-compatible

* introduce import-meta-loader for building pacakge as webpack isn't compatible with import.meta syntax

* lint

* remove import.meta.env in main.js

* set debug flag to false

* migrate to vitest and use jest-canvas-mock 2.4.0 so its comp
atible with vite

* integrate vitest-ui

* fix most of teh test

* snaps

* Add script for testing with vite ui

* fix all tests related to mocking

* fix more test

* fix more

* fix flip.test.tsx

* fix contentxmenu snaps

* fix regression snaps

* fix excalidraw.test.tsx and this makes all tests finally pass :)

* use node 16

* specify node version

* use node 16 in lint as well

* fix mobile.test.tsx

* use node 16

* add style-loader

* upgrade to node 18

* fix lint package.json

* support eslint with vite

* fix lint

* fix lint

* fix ts

* remove pwa/sw stuff

* use env vars in EJS the vite way

* fix lint

* move remainig jest mock/spy to vite

* don't cache locales

* fix regex

* add fonts cache

* tweak

* add custom service worker

* upgrade vite and create font cache again

* cache fonts.css and locales

* tweak

* use manifestTransforms for filtering locales

* use assets js pattern for locales

* add font.css to globIgnore so its pushed to fonts cache

* create a separate chunk for locales with rollup

* remove manifestTransforms and fix glob pattern for locales to filter from workbox pre-cache

* push sourcemaps in production

* add comments in config

* lint

* use node 18

* disable pwa in dev

* fix

* fix

* increase limit of bundle

* upgrade vite-pwa to latest

* remove public/workbox so workbox assets are not precached

* fon't club en.json and percentages.json with manual locales chunk to fix first load+offline mode

* tweak regex

* remove happy-dom as its not used

* add comment

* use any instead of ts-ignore

* cleanup

* remove jest-canvas-mock resolution as vite-canvas-mock was patched locking deps at 2.4.0

* use same theme color present in entry point

* remove vite-plugin-eslint as it improves DX significantly

* integrate vite-plugin-checker for ts errors

* add nabla/vite-plugin-eslint

* use eslint from checker only

* add env variable VITE_APP_COLLAPSE_OVERLAY for collapsing the checker overlay

* tweak vite checker overlay badge position

* Enable eslint behind flag as its not working well with windows with non WSL

* make port configurable

* open the browser when server ready

* enable eslint by default

---------

Co-authored-by: Weslley Braga <weslley@bambee.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-07-27 23:50:11 +05:30
.codesandbox chore: update CodeSandbox links and add a config (#5624) 2022-08-29 18:52:04 +05:30
.github build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
.husky build: temporarily disable pre-commit (#6132) 2023-01-19 13:50:42 +01:00
dev-docs feat: introducing Web-Embeds (alias iframe element) (#6691) 2023-07-24 16:51:53 +02:00
firebase-project fix: update storage.rules (#5020) 2022-04-17 22:47:00 +02:00
public build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
scripts fix: use subdirectory for @excalidraw/excalidraw size limit (#6787) 2023-07-19 22:07:18 +05:30
src build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
.dockerignore build: stops ignoring .env files from docker context so env variables get set during react app build. (#5809) 2022-11-07 16:48:38 +05:30
.editorconfig add editorconfig (#1198) 2020-04-03 19:19:01 +02:00
.env.development build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
.env.production build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
.eslintignore feat: image support (#4011) 2021-10-21 22:05:48 +02:00
.eslintrc.json chore: Update Typescript to 4.4.4 (#4188) 2021-11-02 14:24:16 +02:00
.gitattributes Add gitattributes (#2164) 2020-09-15 21:59:00 +02:00
.gitignore build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
.lintstagedrc.js Keep errors, elements and comments consistent (#2340) 2020-11-05 18:06:18 +01:00
.npmrc feat: color picker redesign (#6216) 2023-05-18 16:06:27 +02:00
.nvmrc Chore: Update .nvmrc to match package.json engines definition (#3148) 2021-03-01 13:22:20 +01:00
.prettierignore Change target branch of coverage and pretty print (#1850) 2020-07-01 12:05:21 +03:00
.watchmanconfig Don't reset cache while zooming using a gesture (#1103) 2020-03-28 16:59:36 -07:00
CHANGELOG.md support embedding scene data to PNG/SVG (#2219) 2020-10-13 14:47:07 +02:00
CONTRIBUTING.md docs: migrating dev docs to docusaurus :) (#6073) 2023-02-01 19:57:54 +05:30
crowdin.yml Locale 2020-03-19 20:38:52 +02:00
docker-compose.yml chore: Update action versions and docker build (#3065) 2021-02-20 14:28:33 +00:00
Dockerfile fix: docker build architecture:linux/amd64 error occur on linux/arm64 instance (#6197) 2023-02-07 11:44:31 +05:30
index.html build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
LICENSE Add MIT License (#176) 2020-01-05 13:09:29 -08:00
package.json build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
README.md docs: fix closing tag in readme (#6424 2023-04-07 17:43:50 +02:00
tsconfig-types.json build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
tsconfig.json build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
vercel.json feat: redirect vscode.excalidraw.com to vscode marketplace (#5285) 2022-06-23 17:42:50 +02:00
vite.config.ts build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
vitest.config.ts build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30
yarn.lock build: migrate to Vite 🚀 (#6818) 2023-07-27 23:50:11 +05:30

Excalidraw

Excalidraw Editor | Blog | Documentation | Excalidraw+

An open source virtual hand-drawn style whiteboard.
Collaborative and end-to-end encrypted.


Excalidraw is released under the MIT license. PRs welcome! Chat on Discord Follow Excalidraw on Twitter

Product showcase

Create beautiful hand-drawn like diagrams, wireframes, or whatever you like.

Features

The Excalidraw editor (npm package) supports:

  • 💯 Free & open-source.
  • 🎨 Infinite, canvas-based whiteboard.
  • ✍️ Hand-drawn like style.
  • 🌓 Dark mode.
  • 🏗️ Customizable.
  • 📷 Image support.
  • 😀 Shape libraries support.
  • 👅 Localization (i18n) support.
  • 🖼️ Export to PNG, SVG & clipboard.
  • 💾 Open format - export drawings as an .excalidraw json file.
  • ⚒️ Wide range of tools - rectangle, circle, diamond, arrow, line, free-draw, eraser...
  • ➡️ Arrow-binding & labeled arrows.
  • 🔙 Undo / Redo.
  • 🔍 Zoom and panning support.

Excalidraw.com

The app hosted at excalidraw.com is a minimal showcase of what you can build with Excalidraw. Its source code is part of this repository as well, and the app features:

  • 📡 PWA support (works offline).
  • 🤼 Real-time collaboration.
  • 🔒 End-to-end encryption.
  • 💾 Local-first support (autosaves to the browser).
  • 🔗 Shareable links (export to a readonly link you can share with others).

We'll be adding these features as drop-in plugins for the npm package in the future.

Quick start

Install the Excalidraw npm package:

npm install react react-dom @excalidraw/excalidraw

or via yarn

yarn add react react-dom @excalidraw/excalidraw

Don't forget to check out our Documentation!

Contributing

Integrations

Who's integrating Excalidraw

Google CloudMetaCodeSandboxObsidian ExcalidrawReplitSliteNotionHackerRank • and many others

Sponsors & support

If you like the project, you can become a sponsor at Open Collective or use Excalidraw+.

Thank you for supporting Excalidraw

Last but not least, we're thankful to these companies for offering their services for free:

Vercel Sentry Crowdin