Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 2.87 KB

CONTRIBUTING.markdown

File metadata and controls

66 lines (48 loc) · 2.87 KB

Contributing

Code

The entire codebase is written in TypeScript, and common types are defined in types/moviematch.ts.

Dependencies

To get started, you'll need to have these dependencies installed:

Project layout

MovieMatch tries to follow Golang's unofficial project layout.

.
├── .github
│   └── workflows # GitHub Actions config
├── cmd
│   └── moviematch # The entrypoint into the application
├── configs
│   └── localization
├── docs
├── internal
│   └── app # Back-end Deno code
│       ├── moviematch
│       └── plex
├── screenshots
├── scripts # Scripts for starting, bundling, and testing the entire codebase.
├── types # Shared application-level types
└── web # Front-end code
    ├── app
    │   ├── src
    │   ├── static
    │   └── types
    ├── design
    └── template

CI

MovieMatch uses GitHub Actions.

There is a workflow that runs the test suite (scripts/test.sh) for every commit.

Release process

  1. Ensure that the VERSION file reflects the version that is to be released
  2. Finalise the RELEASE_NOTES for the release
  3. Trigger a new release with Run workflow, entering the version to be released.

The workflow will automatically create a GitHub release and publish a Docker image.

About the build process

Deno provides a compile sub-command that creates a standalone binary for a given platform. This is the way MovieMatch is distributed.

The end-to-end process is:

  1. The front-end is compiled using Snowpack (output is in web/app/build/dist)
  2. The pkger helper command bundles the web app, along with VERSION and configs/localization into pkg.ts
  3. The pkged import is remapped from pkger.ts to pkger_release.ts for production, and all files imported with readFile, readTextFile, etc. are imported from the pkg.ts import. (Note, this is intended to be temporary until Import Assertions are suitable for adding binary or plain text files into the dependency graph)
  4. deno compile creates a JavaScript bundle starting with the cmd/moviematch/main.ts entrypoint and outputs a moviematch binary.