Files
decomp.me/docs/CONTRIBUTING.md
Ethan Roseman 8ea10ca286 CodeMirror & PresetSelect fix (#413)
* yarn upgrade

* update eslint no-multiple-empty-lines rule

* update Next.js & React

Resolves #358.

* use CodeMirror in scratch editor

* use codemirror on new page

* move extensions out of CodeMirror component

* grow scratch codemirror

* fix state bug

* initial theming

* fix scratch page SSR

* fix credits page rendering

* max width for AsyncButton error popup

* word wrap

* bye monaco

* cleanup

* style scrollbars everywhere

* tab stuff

* updates

* more

* update codemirror theme

* new react, backend deps, preset on scratch, bugfixes

* improve monospace areas

* store preset name on scratch

* stylelint

* mypy

* mypy 2

* monospace

* fix monospace

* add padding to editor

* fix saving

* fix selection colours

* Highlight assembly line on source selected line change (#416)

Co-authored-by: Alex Bates <hi@imalex.xyz>

* mypy & black

* font stuff

* remove courier new

* make diff style consistent with editor

* fix codemirror exception when editing eof

* attempt to reduce layout thrashing

* /new: store presetName in localStorage

* use react-window for diff

* link diff column scroll position

* hide double scrollbar

* increase overscan

* pointer-events:none on diff header

* fix diff header thing

* make diff columns non-draggable

* dont shrink tabs

* add draggable bar between diff columns

* remove log

* fix 2-col mode

* fix diff align

* DiffCell support cell=undefined

* drag better

* style .cm-search

* eth style changes

* reduce rerenders when dragging diff bar

Co-authored-by: Alex Bates <hi@imalex.xyz>
Co-authored-by: hatal175 <hatal175@users.noreply.github.com>
Co-authored-by: Alex Bates <alex@nanaian.town>
2022-03-31 22:22:39 +09:00

2.2 KiB

Contributing

Directory structure

frontend/
  public/        ; Static files
  src/           ; React/Typescript sourcecode

backend/
  compilers/     ; Compiler binaries and configuration
  coreapp/       ; API Django app
    migrations/  ; Database migrations (generated by Django)
  decompme/      ; Main Django app

.env             ; Default configuration
.env.local       ; Local configuration overrides (not checked-in)

Setup

See DOCKER.md for instructions on how to run the project in a Docker container. Otherwise, continue reading this guide.

Dependencies:


Create a file to hold environment variables:

touch .env.local

Backend

cd backend
  • Install Python dependencies with poetry
poetry install
  • Install compilers
poetry run python compilers/download.py
  • Set up the database
poetry run python manage.py migrate
  • Start the API server
poetry run python manage.py runserver

Frontend

cd frontend
  • Install dependencies
yarn
  • Start the development webserver
yarn dev

Optional steps

Notes

Updating the database

If you modify any database models (models.py), you'll need to run the following to update the database:

poetry run python manage.py makemigrations
poetry run python manage.py migrate

Linting

  • Check frontend
cd frontend
yarn lint
  • Autofix frontend
cd frontend
yarn lint --fix
  • Check backend
cd backend
mypy

Storybook

Use yarn storybook to run a Storybook instance on http://localhost:6006. This is useful for testing UI components in isolation.