mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-08 09:56:30 +00:00
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:
parent
3a6b50c4ec
commit
45a03607f9
@ -11,24 +11,24 @@ The Home Assistant frontend is built using web components. For more background a
|
|||||||
|
|
||||||
### Getting the code
|
### 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
|
```shell
|
||||||
$ git clone git@github.com:YOUR_GIT_USERNAME/home-assistant-polymer.git
|
$ git clone git@github.com:YOUR_GIT_USERNAME/frontend.git
|
||||||
$ cd home-assistant-polymer
|
$ cd frontend
|
||||||
$ git remote add upstream https://github.com/home-assistant/home-assistant-polymer.git
|
$ git remote add upstream https://github.com/home-assistant/home-assistant/frontend.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuring Home Assistant
|
### 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).
|
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
|
```yaml
|
||||||
frontend:
|
frontend:
|
||||||
# Example absolute path: /home/paulus/dev/hass/home-assistant-polymer
|
# Example absolute path: /home/paulus/dev/hass/frontend
|
||||||
development_repo: <absolute path to home-assistant-polymer repo>
|
development_repo: /path/to/hass/frontend/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing Node.js
|
### Installing Node.js
|
||||||
@ -75,13 +75,13 @@ Make sure you have cache disabled and correct settings to avoid stale content:
|
|||||||
|
|
||||||
## Creating pull requests
|
## 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
|
```shell
|
||||||
$ git remote add fork <github URL to your fork>
|
$ 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
|
``` bash
|
||||||
$ git add -A
|
$ git add -A
|
||||||
@ -89,15 +89,15 @@ $ git commit -m "Added new feature X"
|
|||||||
$ git push -u fork HEAD
|
$ 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`.
|
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:
|
To test it out inside Home Assistant, run the following command from the main Home Assistant repository:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ pip3 install -e /path/to/home-assistant-polymer/
|
$ pip3 install -e /path/to/hass/frontend/
|
||||||
$ hass --skip-pip
|
$ hass --skip-pip
|
||||||
```
|
```
|
||||||
|
|
||||||
[hass-polymer]: https://github.com/home-assistant/home-assistant-polymer
|
[hass-frontend]: https://github.com/home-assistant/frontend
|
||||||
|
Loading…
x
Reference in New Issue
Block a user