mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 04:16:29 +00:00
Update development.md (#672)
* Update development.md Visual Studio Code with devcontainers is the recommended dev environment for Home Assistant. However, it's not trivial to integrate this dev environment with the frontend dev environment, as the Home Assistant's container doesn't have access to the frontend directory. Adding the instructions on how to mount the frontend directory to the container. * Update development.md * Update development.md
This commit is contained in:
parent
ced2157c73
commit
35ffcbc62b
@ -33,6 +33,23 @@ frontend:
|
||||
development_repo: /path/to/hass/frontend/
|
||||
```
|
||||
|
||||
If you are using Visual Studio Code with devcontainers for Home Assistant, you need to mount the `frontend` directory into the container. Add the following section to `.devcontainer/devcontainer.json`:
|
||||
|
||||
```json
|
||||
"mounts": [
|
||||
"source=/path/to/hass/frontend,target=/workspaces/frontend,type=bind,consistency=cached"
|
||||
]
|
||||
```
|
||||
|
||||
The Home Assistant's devcontainer needs to get rebuit via the `docker-build` [task](/development_environment.md#tasks), and the `configuration.yaml` should point to the path inside the container:
|
||||
|
||||
```yaml
|
||||
frontend:
|
||||
development_repo: /workspaces/frontend/
|
||||
```
|
||||
|
||||
The change to `.devcontainer/devcontainer.json` should be excluded from any PR as it contains your local path to the `frontend` repository.
|
||||
|
||||
### Installing Node.js
|
||||
|
||||
Node.js is required to build the frontend. The preferred method of installing node.js is with [nvm](https://github.com/creationix/nvm). Install nvm using the instructions in the [README](https://github.com/creationix/nvm#install-script), and install the correct node.js by running the following command:
|
||||
|
Loading…
x
Reference in New Issue
Block a user