forked from MapComplete/MapComplete
Docs: Update windows section
This commit is contained in:
parent
6054c7f600
commit
a35a6f5b59
1 changed files with 19 additions and 30 deletions
|
@ -31,17 +31,17 @@ You need at least 3GB RAM available to run MapComplete, but you'll preferably ha
|
|||
To develop and build MapComplete, you
|
||||
|
||||
0. Make a fork and clone the repository. (We recommend a shallow clone with `git clone --filter=blob:none <repo>`)
|
||||
1. Install `python3` if you do not have it already - On Linux: `sudo apt install python3`
|
||||
1. Install `python3` if you do not have it already - On Linux: `sudo apt install python3` or `sudo dnf install python3`
|
||||
2. Install `nvm` to easily install node:
|
||||
- `wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash`
|
||||
- Restart your terminal
|
||||
- Run `nvm install` and `nvm use` to install and use the correct version of node. (_Note: nvm might complain that the relevant version is not yet installed. It'll have it installed only for the current user account but not system-wide - which is fine)
|
||||
4. Run `npm run init` (including **run**, not ~~`npm init`~~)which …
|
||||
3. Run `npm run init` (including **run**, not ~~`npm init`~~)which …
|
||||
- runs `npm ci` for you
|
||||
- generates some additional dependencies and files
|
||||
- does various housekeeping and setup. This can take a few minutes the first time as some PNGs need to be created
|
||||
5. Run `npm run start` to host a local testversion at http://localhost:1234/
|
||||
6. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename`
|
||||
4. Run `npm run start` to host a local testversion at http://127.0.0.1:1234/
|
||||
5. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename`
|
||||
or `userlayout=true#<layout configuration>` as [Query parameter](URL_Parameters.md). Note that the shorter URLs
|
||||
(e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version.
|
||||
|
||||
|
@ -52,31 +52,18 @@ Development using Windows
|
|||
|
||||
You need at least 3GB RAM available to run MapComplete, but you'll preferably have 8GB of free RAM available.
|
||||
|
||||
For Windows you can use the devcontainer, or the WSL subsystem.
|
||||
|
||||
To use the devcontainer in Visual Studio Code:
|
||||
|
||||
0. Make sure you have installed
|
||||
the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
|
||||
extension and it's dependencies.
|
||||
1. Make a fork and clone the repository.
|
||||
2. After cloning, Visual Studio Code will ask you if you want to use the devcontainer.
|
||||
3. Then you can either clone it again in a volume (for better performance), or open the current folder in a container.
|
||||
4. By now, you should be able to run `npm run start` to host a local testversion at http://localhost:1234/index.html
|
||||
5. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename`
|
||||
or `userlayout=true#<layout configuration>` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (
|
||||
e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version.
|
||||
For Windows you can use the WSL subsystem.
|
||||
|
||||
To use the WSL in Visual Studio Code:
|
||||
|
||||
0. Make sure you have installed the [Remote - WSL]() extension and it's dependencies.
|
||||
1. Open a remote WSL window using the button in the bottom left.
|
||||
2. Make a fork and clone the repository.
|
||||
3. Install `npm` using `sudo apt install npm`.
|
||||
4. Run `npm run init` and generate some additional dependencies and generated files. Note that it'll install the
|
||||
1. Make sure you have installed the [Remote - WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) extension and it's dependencies.
|
||||
2. Open a remote WSL window using the button in the bottom left.
|
||||
3. Make a fork and clone the repository.
|
||||
4. Install `npm` using `sudo apt install npm`.
|
||||
5. Run `npm run init` and generate some additional dependencies and generated files. Note that it'll install the
|
||||
dependencies too
|
||||
5. Run `npm run start` to host a local testversion at http://localhost:1234/index.html
|
||||
6. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename`
|
||||
6. Run `npm run start` to host a local testversion at http://127.0.0.1:1234/index.html
|
||||
7. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename`
|
||||
or `userlayout=true#<layout configuration>` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (
|
||||
e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version.
|
||||
|
||||
|
@ -95,10 +82,12 @@ Note that `npm run start` is equivalent to `npm run generate:layeroverview && np
|
|||
Automatic deployment
|
||||
--------------------
|
||||
|
||||
Currently, the master branch is automatically deployed to https://mapcomplete.org/ by a Forgejo action.
|
||||
MapComplete is automatically deployed to various locations, depending on the branch you are working on.
|
||||
|
||||
Every branch is automatically built (upon push) to `https://pietervdvn.github.io/mc/<branchname>` by a GitHub action.
|
||||
The master branch is automatically deployed to https://mapcomplete.org/, and the development branch is available at
|
||||
https://dev.mapcomplete.org/. Both are automatically deployed by a Forgejo action.
|
||||
|
||||
Other branches are automatically deployed to https://builds.mapcomplete.org/<branchname>.
|
||||
|
||||
Deploying a fork
|
||||
----------------
|
||||
|
@ -113,9 +102,9 @@ This script can be invoked with `npm run prepare-deploy`
|
|||
|
||||
If you want to deploy your fork:
|
||||
|
||||
0. `npm run prepare-deploy`
|
||||
1. `npm run build`
|
||||
2. Copy the entire `dist` folder to where you host your website. Visiting `index.html` gives you the landing page,
|
||||
1. `npm run prepare-deploy`
|
||||
2. `npm run build`
|
||||
3. Copy the entire `dist` folder to where you host your website. Visiting `index.html` gives you the landing page,
|
||||
visiting `yourwebsite/<theme>` should bring you to the appropriate theme.
|
||||
|
||||
### Getting your own API-keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue