Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add container dev environment, pkg instructions #412

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ __pycache__
pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml
.nyc_output
/coverage

# Translations
*.mo
Expand Down
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading