Link Search Menu Expand Document

Development

This library is hosted on Github, contributions are more then welcome.

  1. Fork library
  2. Compile the library
  3. Run the tests
  4. Debugging
  5. Run documentation generator locally
  6. Contributors ✨

Fork library

You should start by creating a fork. Or if you already had a fork sync the fork:

# Add the remote, call it "upstream": (only once)
git remote add upstream https://github.com/svrooij/sonos2mqtt.git

# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:
git fetch upstream

# Make sure that you're on your master branch:
git checkout master

# Rewrite your master branch so that any commits of yours that
# aren't already in upstream/master are replayed on top of that
# other branch:
git rebase upstream/master

Compile the library

Before you can use this library is has to be compiled.

npm run install && npm run build

Run the tests

After changing somehting you should run the tests (as they are automatically run before your PR is accepted).

npm run test

It’s also important to start the app and test it in your local environment. If you don’t want to use your production mqtt server. Just start a temporary one with docker.

Debugging

This library has a VSCode task defined, be sure to change your sonos host in the .vscode/launch.json file. You should be able to debug the library in VSCode with breakpoints and everything.

Run documentation generator locally

The documentation can be found in /docs and uses Jekyll to convert the markdown to html. To check the generated documenation locally you can use the following script. It uses docker, so it won’t install anything on your machine. It also has live reload to you can edit and save and should see the changes instantly.

npm run serve-docs

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Tag the all-contributors bot in your PR and you will get added automically to the list of contributors.