From f2f70316c4c23930adc29450f11225f4e5cf8193 Mon Sep 17 00:00:00 2001 From: raylu <90059+raylu@users.noreply.github.com> Date: Wed, 27 Sep 2023 23:39:18 -0700 Subject: [PATCH] Add container dev environment, pkg instructions --- .gitignore | 5 +---- README.md | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 22103c9a..ea727859 100644 --- a/.gitignore +++ b/.gitignore @@ -23,10 +23,7 @@ __pycache__ pip-log.txt # Unit test / coverage reports -.coverage -.tox -nosetests.xml -.nyc_output +/coverage # Translations *.mo diff --git a/README.md b/README.md index f884fe56..6c945a7b 100644 --- a/README.md +++ b/README.md @@ -35,22 +35,31 @@ npm install -g gtp2ogs ### Building from source -To build from source you will need to have `node.js` installed on your system. -You will also need to have the `yarn` and `gulp` npm packages installed. Once -you have the prerequisites you can run `yarn` to install the package dependencies, -and - +To build from source you will need to have node.js installed on your system. +You will also need to have `yarn` installed. Then, run ``` -gulp +yarn install +yarn exec -- gulp ``` to run the build process. The resulting compiled javascript file will be located in `dist/gtp2ogs.js` which you can then run with - ``` node dist/gtp2ogs.js ``` +To build a standalone binary that doesn't depend on node, use pkg: +``` +yarn exec -- pkg -C brotli . +``` + +If you do not want to install node.js and yarn locally, another option is +``` +docker run --rm -it -v "$PWD":/usr/src -w /usr/src node:slim yarn install +docker run --rm -it -v "$PWD":/usr/src -w /usr/src node:slim yarn exec -- gulp +docker run --rm -it -v "$PWD":/usr/src -w /usr/src node:slim yarn exec -- pkg -C brotli . +``` + ## Running your bot Once you have your API Key and `gtp2ogs` installed, you can connect your bot to OGS