Skip to content

Commit

Permalink
docs: add contributing md
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniiriarios committed Mar 13, 2023
1 parent d5a312c commit 75b75e9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 20 deletions.
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing

## Getting Started

This project requires Node.js. Get started with:

```sh
npm i
```

## Building

To build the project (the build will be in `build/me.reinii.harvest-billables.sdPlugin`):

```sh
npm run build
```

To copy the build to the plugin directory:

```sh
npm run copy
```

Or, to run both:

```sh
npm run build-copy
```

## DevTools

You can debug error messages by enabling DevTools.

On macOS, you will first need to run the following command line in the Terminal:

```sh
defaults write com.elgato.StreamDeck html_remote_debugging_enabled -bool YESCopy
```

On Windows, you will need to add a `DWORD` `html_remote_debugging_enabled` with value `1` in the
registry at `HKEY_CURRENT_USER\Software\Elgato Systems GmbH\StreamDeckCopy`.

After you relaunch the Stream Deck app, you can open http://localhost:23654/ in Chrome, where you
will find a list of ‘Inspectable pages‘ (plugins). Click `me.reinii.harvest-billables`.
Error message details may be available in the console.

## Tests

This project uses jest. You can run tests with:

```sh
npm run test
```

Before running, copy `.env-sample` to `.env` and fill with your keys. This file takes the place
of Stream Deck settings for the purposes of testing.
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ ids are necessary as they refer to your organization and not your user account.

You only need one API token for all buttons, but you must enter the credentials in every button.

### The Buttons
## The Buttons

#### Timer
### Timer

The Timer button is a simple start/stop button and monitor for individual tasks. After entering
your credentials in the settings, a list of available tasks should display in the Task dropdown.
Expand All @@ -36,7 +36,7 @@ After selecting a task, the button should display a play `⏵` or pause `⏸` bu
tracked for that task for the current day. You can set a Title (looks best if position is "Align
Top") to differentiate Task timers.

#### Billables Status
### Billables Status

This button will only work if your organization also uses [Forecast][forecast] to track billable
hours. The purpose of this button is to keep you on track for billable hours for the week.
Expand Down Expand Up @@ -89,23 +89,6 @@ with a `404` instead of a `401`/`403`.

\*\* The second digit in `H#000` and `F#000` errors refers to `GET`, `POST`, or `PATCH` (0, 1, or 2).

### Development Debugging

You can debug error messages further by enabling DevTools.

On macOS, you will first need to run the following command line in the Terminal:

```sh
defaults write com.elgato.StreamDeck html_remote_debugging_enabled -bool YESCopy
```

On Windows, you will need to add a `DWORD` `html_remote_debugging_enabled` with value `1` in the
registry at `HKEY_CURRENT_USER\Software\Elgato Systems GmbH\StreamDeckCopy`.

After you relaunch the Stream Deck app, you can open http://localhost:23654/ in Chrome, where you
will find a list of ‘Inspectable pages‘ (plugins). Click `me.reinii.harvest-billables`.
Error message details may be available in the console.

[download-latest]: https://github.com/reiniiriarios/stream-deck-billables-harvest/releases/latest
[stream-deck]: https://www.elgato.com/en/welcome-to-stream-deck
[harvest]: https://www.getharvest.com/
Expand Down

0 comments on commit 75b75e9

Please sign in to comment.