aboutsummaryrefslogtreecommitdiffstats
path: root/dev-docs/docs/introduction
diff options
context:
space:
mode:
authorkj_sh6042026-03-15 16:19:35 -0400
committerkj_sh6042026-03-15 16:19:35 -0400
commitbc297e5e496d9f48ef77581b7fb41fdf328a62cf (patch)
tree66192466eef76ee4c5cf71a9788ae9fe947514d4 /dev-docs/docs/introduction
parentf6538b8f1a78a7d72a41916ac79376f8c2d30193 (diff)
refactor: dev-docs/
Diffstat (limited to 'dev-docs/docs/introduction')
-rw-r--r--dev-docs/docs/introduction/contributing.mdx72
-rw-r--r--dev-docs/docs/introduction/development.mdx102
-rw-r--r--dev-docs/docs/introduction/get-started.mdx17
3 files changed, 191 insertions, 0 deletions
diff --git a/dev-docs/docs/introduction/contributing.mdx b/dev-docs/docs/introduction/contributing.mdx
new file mode 100644
index 0000000..1602fd7
--- /dev/null
+++ b/dev-docs/docs/introduction/contributing.mdx
@@ -0,0 +1,72 @@
+# Contributing
+
+Pull requests are welcome. For major changes, please [open an issue](https://github.com/excalidraw/excalidraw/issues/new) first to discuss what you would like to change.
+
+We have a [roadmap](https://github.com/orgs/excalidraw/projects/3) which we strongly recommend to go through and check if something interests you.
+For new contributors we would recommend to start with *Easy* tasks.
+
+In case you want to pick up something from the roadmap, comment on that issue and one of the project maintainers will assign it to you, post which you can discuss in the issue and start working on it.
+
+## Setup
+
+### Option 1 - Manual
+
+1. Fork and clone the repo
+1. Run `yarn` to install dependencies
+1. Create a branch for your PR with `git checkout -b your-branch-name`
+
+> To keep `master` branch pointing to remote repository and make pull requests from branches on your fork, run:
+>
+> ```bash
+> git remote add upstream https://github.com/excalidraw/excalidraw.git
+> git fetch upstream
+> git branch --set-upstream-to=upstream/master master
+> ```
+
+### Option 2 - CodeSandbox
+
+1. Go to https://codesandbox.io/p/github/excalidraw/excalidraw
+1. Connect your GitHub account
+1. Go to Git tab on left side
+1. Tap on `Fork Sandbox`
+1. Write your code
+1. Commit and PR automatically
+
+## Pull Request Guidelines
+
+Don't worry if you get any of the below wrong, or if you don't know how. We'll gladly help out.
+
+### Title
+
+Make sure the title starts with a semantic prefix:
+
+- **feat**: A new feature
+- **fix**: A bug fix
+- **docs**: Documentation only changes
+- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
+- **refactor**: A code change that neither fixes a bug nor adds a feature
+- **perf**: A code change that improves performance
+- **test**: Adding missing tests or correcting existing tests
+- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
+- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
+- **chore**: Other changes that don't modify src or test files
+- **revert**: Reverts a previous commit
+
+### Testing
+
+Once you submit your pull request it will automatically be tested. Be sure to check the results of the test and fix any issues that arise.
+
+It's also a good idea to consider if your change should include additional tests. This is highly recommended for new features or bug-fixes. For example, it's good practice to create a test for each bug you fix which ensures that we don't regress the code in the future.
+
+Finally - always manually test your changes using the convenient staging environment deployed for each pull request. As much as local development attempts to replicate production, there can still be subtle differences in behavior. For larger features consider testing your change in multiple browsers as well.
+
+:::note
+Some checks, such as the `lint` and `test`, require approval from the maintainers to run.
+They will appear as `Expected — Waiting for status to be reported` in the PR checks when they are waiting for approval.
+:::
+
+## Translating
+
+To translate Excalidraw into other languages, please visit [our Crowdin page](https://crowdin.com/project/excalidraw). To add a new language, [open an issue](https://github.com/excalidraw/excalidraw/issues/new) so we can get things set up on our end first.
+
+Translations will be available on the app if they exceed a certain threshold of completion (currently **85%**).
diff --git a/dev-docs/docs/introduction/development.mdx b/dev-docs/docs/introduction/development.mdx
new file mode 100644
index 0000000..63c1875
--- /dev/null
+++ b/dev-docs/docs/introduction/development.mdx
@@ -0,0 +1,102 @@
+# Development
+
+## Code Sandbox
+
+- Go to https://codesandbox.io/p/github/excalidraw/excalidraw
+ - You may need to sign in with GitHub and reload the page
+- You can start coding instantly, and even send PRs from there!
+
+## 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/)
+- [Yarn](https://yarnpkg.com/getting-started/install) (v1 or v2.4.2+)
+- [Git](https://git-scm.com/downloads)
+
+### Clone the repo
+
+```bash
+git clone https://github.com/excalidraw/excalidraw.git
+```
+
+### Install the dependencies
+
+```bash
+yarn
+```
+
+### Start the server
+
+```bash
+yarn 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
+yarn
+```
+
+### Run the project
+
+```bash
+yarn start
+```
+
+### Reformat all files with Prettier
+
+```bash
+yarn fix
+```
+
+### Run tests
+
+```bash
+yarn test
+```
+
+### Update test snapshots
+
+```bash
+yarn test:update
+```
+
+### Test for formatting with Prettier
+
+```bash
+yarn 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.
diff --git a/dev-docs/docs/introduction/get-started.mdx b/dev-docs/docs/introduction/get-started.mdx
new file mode 100644
index 0000000..c5d9ab0
--- /dev/null
+++ b/dev-docs/docs/introduction/get-started.mdx
@@ -0,0 +1,17 @@
+---
+title: Introduction
+slug: ../
+---
+
+## Try now
+
+Go to [excalidraw.com](https://excalidraw.com) to start sketching.
+
+## How are these docs structured
+
+These docs are focused on developers, and structured in the following way:
+
+- [Introduction](/docs/) — development setup and introduction.
+- [@excalidraw/excalidraw](/docs/@excalidraw/excalidraw/installation) — docs for the npm package to help you integrate Excalidraw into your own app.
+- Editor — IN PROGRESS. Docs describing the internals of the Excalidraw editor to help in contributing to the codebase.
+- [@excalidraw/mermaid-to-excalidraw](/docs/@excalidraw/mermaid-to-excalidraw/installation) - Docs for the mermaid to excalidraw parser