mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-27 04:52:56 +00:00
a396a4e6664505dde33ff2f8d47448518314b545
The behavior of 'crossorigin' without a value is the same as anonymous, which means user credentials such as cookies, client-side SSL certificates or HTTP authentication will not be passed on. We want the preload links to work even when they are behind a proxy that requires an authentication cookie, such as Cloudflare Access (CF_Authorization), so we need to explicitly send credentials with the "use-credentials" value. ES modules are always fetched with CORS, with anonymous being the default. Some browsers (Chromium) will realize that the request is to the same origin, and send credentials anyways, while others (Safari) will not, so we need to explicitly send credentials to make sure they load in all cases. See https://jakearchibald.com/2017/es-modules-in-browsers/
Home Assistant Polymer 
This is the repository for the official Home Assistant frontend.
- View demo of the Polymer frontend
- More information about Home Assistant
- Frontend development instructions
Development
- Initial setup:
script/setup - Development: Instructions
- Production build:
script/build_frontend - Gallery:
cd gallery && script/develop_gallery - Hass.io: Instructions
Frontend development
Classic environment
A complete guide can be found at the following link. It describes a short guide for the build of project.
Docker environment
It is possible to compile the project and/or run commands in the development environment having only the Docker pre-installed in the system. On the root of project you can do:
sh ./script/docker_run.sh buildBuild all the project with one commandsh ./script/docker_run.sh bashOpen an interactive shell (the same environment generated by the classic environment) where you can run commands. This bash work on your project directory and any change on your file is automatically present within your build bash.
Note: if you have installed npm in addition to the docker, you can use the commands npm run docker_build and npm run bash to get a full build or bash as explained above
License
Home Assistant is open-source and Apache 2 licensed. Feel free to browse the repository, learn and reuse parts in your own projects.
Description
Languages
TypeScript
98.8%
JavaScript
1.1%
