Skip to content

Commit 89a6b66

Browse files
authored
Merge pull request #1784 from nomis52/dev-docs
Add a DEVELOPERS.md to explain how to test BubbleCard
2 parents 951dfe7 + 5592404 commit 89a6b66

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

DEVELOPERS.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Developer Guide
2+
3+
This guide explains how to test changes to BubbleCard during development.
4+
5+
## Testing BubbleCard Changes With Home Assistant
6+
7+
When making modifications to BubbleCard, follow this workflow to test your changes:
8+
9+
### 1. Install Dependencies
10+
11+
```bash
12+
npm install
13+
```
14+
15+
### 2. Build the Distribution
16+
17+
After making your changes to the source files, build the distribution:
18+
19+
```bash
20+
npm run dist
21+
```
22+
23+
This will compile your changes and update the files in the `dist/` directory, including `bubble-card.js`.
24+
25+
### 3. Commit Your Changes
26+
27+
Make sure to commit both your source changes and the built distribution files:
28+
29+
```bash
30+
git add .
31+
git commit -m "Your commit message"
32+
```
33+
34+
**Important:** Always include the built `bubble-card.js` file in your commits, as this is what Home Assistant will actually use.
35+
36+
### 4. Push to Your Fork
37+
38+
Push your changes to your GitHub fork:
39+
40+
```bash
41+
git push origin your-branch-name
42+
```
43+
### 5. Remove the Official Bubble Card
44+
45+
Be sure to remove any existing Bubble Card installations. If you previously
46+
installed BubbleCard with HACS:
47+
48+
1. In HACS, search for "Bubble Card"
49+
2. Click the three dots menu (⋮) and select "Remove"
50+
51+
### 6. Add Your Fork as a Custom Repository in HACS
52+
53+
To test your changes in Home Assistant:
54+
55+
1. Open Home Assistant and go to **HACS**
56+
2. Click the three dots menu (⋮) in the top right corner
57+
3. Select **Custom repositories**
58+
4. Add your fork URL: `https://github.com/your-user/Bubble-Card`
59+
5. Set the category to **Dashboard**
60+
6. Click **Add**
61+
7. Reload Home Assistant
62+
63+
64+
### 7. Install Your Development Version
65+
66+
1. In HACS, search for "Bubble Card"
67+
2. You should now see your fork listed as an option
68+
3. Install it (or update if you already have it installed)
69+
4. Restart Home Assistant or clear your browser cache
70+
5. Your changes should now be active

0 commit comments

Comments
 (0)