Skip to content

Commit ae2d644

Browse files
committed
Add dev info to readme
1 parent 208ecd0 commit ae2d644

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

CONTRIBUTING.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing
2+
If you plan to contribute back to this repo, please fork & open a PR.
3+
4+
5+
## How to add a brand
6+
See Wiki on [how to add a brand](https://github.com/tmjo/charger-card/wiki/How-to-add-template-for-new-brand). Follow the instructions and open a PR. If you do not have the knowledge to do all this, please join up with some fellow charger friends that share your needs and do it together.
7+
8+
9+
## How to add translation
10+
11+
Only native speaker should translate to specific language.
12+
13+
1. Copy `src/localize/languages/en.json` file and name it with appropriate language code.
14+
2. Translate only keys in this file, not values.
15+
3. Import your translation in `src/localize/localize.ts` file and add it to _const languages_. Both are at the top of the file, see how others did it.
16+
4. Mention your translation in `README.md` file under translations.
17+
5. Test that everything works fine!
18+
6. Open a PR.
19+
20+
## How to run locally
21+
1. Clone this repo to wherever you want (typically to the config/www folder of HA or your HA dev container)
22+
```sh
23+
git clone https://github.com/tmjo/charger-card.git
24+
```
25+
26+
2. Go into the repo folder:
27+
```sh
28+
cd charger-card
29+
```
30+
3. Install dependencies (Node.js and npm are required):
31+
```sh
32+
npm install
33+
```
34+
4. Run development server. It's going to watch source files, recompile on changes and server compiled file on local server.
35+
```sh
36+
npm start
37+
```
38+
5. Add `http://localhost:5000/charger-card.js` to your Lovelace resources.
39+
40+
Now you can make changes to files in `src` folder. Development server will automatically rebuild on changes. Lovelace will load resource from development server. Refresh the browser to see changes. Make sure cache is cleared or disabled.
41+

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ This card supports translations. Please, help to add more translations and impro
105105
This card was originally made to support charging robots from [Easee](https://easee-international.com/), but has been further developed to be fully configurable and customizable and can be used with any kind of charger. It can even be used for other things than EV-chargers, for instance your electric car or something completely different. Some `brand`s are added with built-in support to make the configuration really easy:
106106

107107
- Easee
108-
- [_Your charger?_][edit-readme]
108+
- [_Your charger?_](https://github.com/tmjo/charger-card/wiki/How-to-add-template-for-new-brand)
109+
110+
See [Wiki on how to add a brand](https://github.com/tmjo/charger-card/wiki/How-to-add-template-for-new-brand).
109111

110112
# Advanced configuration
111113

@@ -492,7 +494,7 @@ details:
492494
## Development
493495
Want to contribute to the project? Translations? Adding your `brand` as a pre-defined template?
494496

495-
First of all, thanks! Check [contributing guideline](./CONTRIBUTING.md) for more information.
497+
First of all, thanks! Check [contributing guideline](./CONTRIBUTING.md) for more information. See [Wiki on how to add a brand](https://github.com/tmjo/charger-card/wiki/How-to-add-template-for-new-brand).
496498

497499

498500

0 commit comments

Comments
 (0)