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

Document UI dev setup in the README #252

Merged
merged 1 commit into from
Dec 10, 2020
Merged
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
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@ details.
## Development

To develop `policy-bot`, you will need a [Go installation](https://golang.org/doc/install).
If you want to build the UI, you'll also need [NodeJS](https://nodejs.org/en/)
and [Yarn](https://yarnpkg.com/).

**Run style checks and tests**

Expand All @@ -626,6 +628,26 @@ To develop `policy-bot`, you will need a [Go installation](https://golang.org/do
- `config/policy-bot.yml` is used as the default configuration file
- The server is available at `http://localhost:8080/`

**Installing UI dependencies and building assets**

# install dependencies
yarn install

# build CSS and JS assets
yarn run build

- This generates a combined stylesheet with `policy-bot` styles and
[Tailwind](https://tailwindcss.com/) core styles. It also copies JS files and
other assets into the correct locations.
- To use the local asset files with a local server, add or uncomment the
following in the server configuration file:

```yaml
files:
static: build/static
templates: server/templates
```

**Running the server via docker**

# copy and edit the server config
Expand Down