diff --git a/apps/docs/docs/Reference/contributing/dev-env/_category_.json b/apps/docs/docs/Reference/contributing/dev-env/_category_.json new file mode 100644 index 0000000..6b64aa0 --- /dev/null +++ b/apps/docs/docs/Reference/contributing/dev-env/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Development Environment", + "position": 2, + "link": { + "type": "generated-index", + "description": "Setup your development environment" + } +} diff --git a/apps/docs/docs/Reference/contributing/dev-env/disploy.md b/apps/docs/docs/Reference/contributing/dev-env/disploy.md new file mode 100644 index 0000000..8508ab7 --- /dev/null +++ b/apps/docs/docs/Reference/contributing/dev-env/disploy.md @@ -0,0 +1,21 @@ +# Disploy + +This page will go over how to setup a development environment for Disploy. + +## Prerequisites + +- [Node.js](https://nodejs.org/en/) (v18 or higher, we recommend using [volta](https://volta.sh/) to install) +- [Yarn](https://yarnpkg.com/) (use `volta install yarn` to install) +- Git +- A code editor that works well with TypeScript (we recommend [VSCode](https://code.visualstudio.com/)) + +## Setup + +1. Clone the Disploy repository: `git clone https://github.com/Disploy/disploy` +2. Change directory to the Disploy repository: `cd disploy` +3. Install the dependencies: `yarn install` +4. Enter development mode: `yarn dev --filter=!@disploy/docs` +5. Open a new terminal and change directory to `apps/example` and run `yarn` for the first time, this will link the CLI's executable. +6. Make changes to the code and see them live transpile and type check in the first terminal. +7. For the first time make a new file called `.env` at the root of the repo, and fill it in with keys & values from `.env.example` +8. To run the example app, run `yarn workspace @disploy/example disploy dev` diff --git a/apps/docs/docs/Reference/contributing/index.md b/apps/docs/docs/Reference/contributing/index.md new file mode 100644 index 0000000..cc9d680 --- /dev/null +++ b/apps/docs/docs/Reference/contributing/index.md @@ -0,0 +1,47 @@ +--- +sidebar_position: 1 +--- + +# Contributing + +Thanks for your consideration to contribute to Disploy 💙 +We respect and appreciate all contributions, no matter how large or small. + +## Projects + +The Disploy ecosystem includes a number of repositories within the [Disploy organisation](https://github.com/Disploy). + +When it comes to contributions, repositories vary in scope, use different programming languages, and have varying levels of difficulty. + +Here's a quick comparison to help you decide which repository might be the best to start contributing to (and/or is of interest to you): + +| Repository | Scope | Language | Difficulty | +| ---------------------- | ----- | ---------- | ---------- | +| [`create-disploy-app`] | CLI | Go | Easy | +| [`disploy`] | Core | TypeScript | Medium | +| [`disploy/cli`] | CLI | TypeScript | Hard | +| [`disbench`] | CLI | Go | Hard | + +### [`disploy`] + +The core of Disploy, written in TypeScript. This package is responsible for the core functionality of Disploy; think of it as the "engine" of Disploy. It is not a server, the user of the library must implement their own idea of a server. This allows Disploy to be used in a variety of different environments, such as Node.js, Deno, and edge function platforms like Cloudflare Workers. + +### [`disploy/cli`] + +This package is not a "real package" as it lives in a folder of the [`disploy`] package since it interfaces with [`disploy`] it self and wouldn't make sense to be a separate package due to version mismatches. This package is what makes the "CLI Framework" of Disploy; it's written in TypeScript and is the package used to run the `disploy` command in your terminal. The main purpose of this package is to take in commands, handlers and more and transform them into a single ["entry point"] that can be either imported with a [standalone "entry point"] or deployed straight to Cloudflare Workers with a ["entry point" made for Cloudflare Workers]. It's completely [optional](/docs/Reference/framework-less/) to use this package, it's just a convenience package to make it easier to create simple but powerful bots. + +### [`create-disploy-app`] + +Create Disploy App is a CLI tool written in Go that helps you create a new Disploy app. + +### [`disbench`] + +Disbench is a CLI tool written in Go that helps you benchmark Disploy apps. + +[`disploy`]: https://github.com/Disploy/disploy/tree/main/packages/disploy +[`disploy/cli`]: https://github.com/Disploy/disploy/tree/main/packages/disploy/cli +["entry point"]: https://github.com/Disploy/disploy/tree/main/packages/disploy/cli/assets/code +[standalone "entry point"]: https://github.com/Disploy/disploy/blob/main/packages/disploy/cli/assets/code/standaloneEntry.js +["entry point" made for cloudflare workers]: https://github.com/Disploy/disploy/blob/main/packages/disploy/cli/assets/code/cfWorkerEntry.js +[`create-disploy-app`]: https://github.com/Disploy/create-disploy-app +[`disbench`]: https://github.com/Disploy/disbench