Skip to content

Commit

Permalink
Add container dev environment, pkg instructions (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Oct 30, 2023
1 parent 58310d2 commit d2b8139
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
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

0 comments on commit d2b8139

Please sign in to comment.