Update development instructions for frontend (#445)

* Revise frontend github repo location

The home-assistant-polymer repo seem to redirect to the home-assistant/frontend, so use that instead

* Consistent dummy path

Be consistent and use the same dummy path for the frontend throughout this instruction

* Update docs/frontend_development.md

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* ✏️ Tweak

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Jonathan Martens 2020-03-22 21:05:57 +01:00 committed by GitHub
parent 3a6b50c4ec
commit 45a03607f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,24 +11,24 @@ The Home Assistant frontend is built using web components. For more background a
### Getting the code
First step is to fork the [home-assistant-polymer repository][hass-polymer] and add the upstream remote. You can place the forked repository anywhere on your system.
The first step is to fork the [frontend repository][hass-frontend] and add the upstream remote. You can place the forked repository anywhere on your system.
```shell
$ git clone git@github.com:YOUR_GIT_USERNAME/home-assistant-polymer.git
$ cd home-assistant-polymer
$ git remote add upstream https://github.com/home-assistant/home-assistant-polymer.git
$ git clone git@github.com:YOUR_GIT_USERNAME/frontend.git
$ cd frontend
$ git remote add upstream https://github.com/home-assistant/home-assistant/frontend.git
```
### Configuring Home Assistant
You will need to have an instance of Home Assistant set up. See our guide on [setting up a development environment](https://developers.home-assistant.io/docs/en/development_environment.html).
Next step is to configure Home Assistant to use the development mode for the frontend. Do this by updating the frontend config in your `configuration.yaml` and set the path to the home-assistant-polymer repository that you cloned in the last step:
Next step is to configure Home Assistant to use the development mode for the frontend. Do this by updating the frontend config in your `configuration.yaml` and set the path to the frontend repository that you cloned in the last step:
```yaml
frontend:
# Example absolute path: /home/paulus/dev/hass/home-assistant-polymer
development_repo: <absolute path to home-assistant-polymer repo>
# Example absolute path: /home/paulus/dev/hass/frontend
development_repo: /path/to/hass/frontend/
```
### Installing Node.js
@ -75,13 +75,13 @@ Make sure you have cache disabled and correct settings to avoid stale content:
## Creating pull requests
If you're planning on issuing a PR back to the Home Assistant codebase you need to fork the polymer project and add your fork as a remote to the Home Assistant Polymer repo.
If you're planning on issuing a PR back to the Home Assistant codebase you need to fork the frontend project and add your fork as a remote to the Home Assistant frontend repo.
```shell
$ git remote add fork <github URL to your fork>
```
When you've made your changes and are ready to push them change to the working directory for the polymer project and then push your changes
When you've made your changes and are ready to push them change to the working directory for the frontend project and then push your changes
``` bash
$ git add -A
@ -89,15 +89,15 @@ $ git commit -m "Added new feature X"
$ git push -u fork HEAD
```
## Building the Polymer frontend
## Building the frontend
If you're making changes to the way the frontend is packaged, it might be necessary to try out a new packaged build of the frontend in the main repository (instead of pointing it at the frontend repo). To do so, first build a production version of the frontend by running `script/build_frontend`.
To test it out inside Home Assistant, run the following command from the main Home Assistant repository:
```shell
$ pip3 install -e /path/to/home-assistant-polymer/
$ pip3 install -e /path/to/hass/frontend/
$ hass --skip-pip
```
[hass-polymer]: https://github.com/home-assistant/home-assistant-polymer
[hass-frontend]: https://github.com/home-assistant/frontend