Skip to content

Commit

Permalink
[README] Remove information about two parts build
Browse files Browse the repository at this point in the history
It's actually irrelevant from the DX point of view. If the devs are
interested in this kind of information they can always check out
./build.js
  • Loading branch information
rexim committed Nov 23, 2023
1 parent 965c8db commit de5fc71
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ $ iexplore.exe http://localhost:6969/

The whole build is organized so you can just serve the repo via an HTTP server and it just works. This is done to simplify deployment to [GitHub pages](https://pages.github.com/). We just tell GitHub to service this repo as is. The build artifacts are also commited to the repo. So if you want to simply get the website working you don't even have to build anything. Just serve the repo.

This build consist of two parts: `main` and `serviceworker`. This separation is important because these two parts are built with different TypeScript flags and dependancies. We are planning to get rid of the separation in the future somehow.

The build is done via the [./build.js](./build.js) script. It is recommended to read it to get an idea on how it works. It is also recommended to check the `"scripts"` section of [./package.json](./package.json) to get an idea on how it is called from `npm run`.

Before doing any building make sure you installed all the necessary dependencies:
Expand All @@ -31,28 +29,12 @@ Before doing any building make sure you installed all the necessary dependencies
$ npm install
```

To build both of the parts:
To build all the artifacts

```console
$ npm run build
```

### Building `main` part only

```console
$ npm run build -- main
```

This command takes all the files [./ts/](./ts/) and compiles them to JavaScript in [./js/](./js/).

### Building `serviceworker` part

```console
$ npm run build -- serviceworker
```

This compiles [./serviceworker.ts](./serviceworker.ts) to [./serviceworker.js](./serviceworker.js).

## Watching

The [./build.js](./build.js) script enables you to [Watch](https://www.typescriptlang.org/docs/handbook/configuring-watch.html#handbook-content) the source code:
Expand All @@ -61,16 +43,14 @@ The [./build.js](./build.js) script enables you to [Watch](https://www.typescri
$ npm run watch
```

To watch the `main` part:
```console
$ npm run watch -- main
```
## Serving and Watching

To watch the `serviceworker` part:
```console
$ npm run watch -- serviceworker
$ npm run service
```

This starts both `python3 -m http.server 6969` and [Watching](#Watching) at the same time, providing a convenient development environment.

# Filter Development

**WARNING! Knowledge of [WebGL](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API) or [OpenGL](https://www.opengl.org/) is required to read this section!**
Expand Down

0 comments on commit de5fc71

Please sign in to comment.