|
1 | | -## Developer manual |
2 | | -This section is intended for the developer. It can be deleted later |
3 | | - |
4 | | -### Getting started |
5 | | - |
6 | | -You are almost done, only a few steps left: |
7 | | -1. Create a new repository on GitHub with the name `ioBroker.vis-3dmodel` |
8 | | -1. Initialize the current folder as a new git repository: |
9 | | - ```bash |
10 | | - git init |
11 | | - git add . |
12 | | - git commit -m "Initial commit" |
13 | | - ``` |
14 | | -1. Link your local repository with the one on GitHub: |
15 | | - ```bash |
16 | | - git remote add origin https://github.com/Excodibur/ioBroker.vis-3dmodel |
17 | | - ``` |
18 | | - |
19 | | -1. Push all files to the GitHub repo: |
20 | | - ```bash |
21 | | - git push origin master |
22 | | - ``` |
23 | | - |
24 | | -1. Head over to [widgets/vis-3dmodel.html](widgets/vis-3dmodel.html) and start programming! |
25 | | - |
26 | | -### Best Practices |
27 | | -We've collected some [best practices](https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices) regarding ioBroker development and coding in general. If you're new to ioBroker or Node.js, you should |
28 | | -check them out. If you're already experienced, you should also take a look at them - you might learn something new :) |
29 | | -
|
30 | | -### Scripts in `package.json` |
31 | | -Several npm scripts are predefined for your convenience. You can run them using `npm run <scriptname>` |
32 | | -| Script name | Description | |
33 | | -|-------------|----------------------------------------------------------| |
34 | | -| `test:package` | Ensures your `package.json` and `io-package.json` are valid. | |
35 | | -| `test` | Performs a minimal test run on package files. | |
36 | | -
|
37 | | -### Publishing the widget |
38 | | -Since you have chosen GitHub Actions as your CI service, you can |
39 | | -enable automatic releases on npm whenever you push a new git tag that matches the form |
40 | | -`v<major>.<minor>.<patch>`. The necessary steps are described in `.github/workflows/test-and-release.yml`. |
41 | | -
|
42 | | -To get your widget released in ioBroker, please refer to the documentation |
43 | | -of [ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-latest-repository). |
44 | | -
|
45 | | -### Test the adapter manually on a local ioBroker installation |
46 | | -In order to install the adapter locally without publishing, the following steps are recommended: |
47 | | -1. Create a tarball from your dev directory: |
48 | | - ```bash |
49 | | - npm pack |
50 | | - ``` |
51 | | -1. Upload the resulting file to your ioBroker host |
52 | | -1. Install it locally (The paths are different on Windows): |
53 | | - ```bash |
54 | | - cd /opt/iobroker |
55 | | - npm i /path/to/tarball.tgz |
56 | | - ``` |
57 | | -
|
58 | | -For later updates, the above procedure is not necessary. Just do the following: |
59 | | -1. Overwrite the changed files in the adapter directory (`/opt/iobroker/node_modules/iobroker.vis-3dmodel`) |
| 1 | +## Developer manual |
| 2 | +This section is intended for the developer. It can be deleted later |
| 3 | + |
| 4 | +### Getting started |
| 5 | + |
| 6 | +You are almost done, only a few steps left: |
| 7 | +1. Create a new repository on GitHub with the name `ioBroker.vis-3dmodel` |
| 8 | +1. Initialize the current folder as a new git repository: |
| 9 | + ```bash |
| 10 | + git init |
| 11 | + git add . |
| 12 | + git commit -m "Initial commit" |
| 13 | + ``` |
| 14 | +1. Link your local repository with the one on GitHub: |
| 15 | + ```bash |
| 16 | + git remote add origin https://github.com/Excodibur/ioBroker.vis-3dmodel |
| 17 | + ``` |
| 18 | + |
| 19 | +1. Push all files to the GitHub repo: |
| 20 | + ```bash |
| 21 | + git push origin master |
| 22 | + ``` |
| 23 | + |
| 24 | +1. Head over to [widgets/vis-3dmodel.html](widgets/vis-3dmodel.html) and start programming! |
| 25 | + |
| 26 | +### Best Practices |
| 27 | +We've collected some [best practices](https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices) regarding ioBroker development and coding in general. If you're new to ioBroker or Node.js, you should |
| 28 | +check them out. If you're already experienced, you should also take a look at them - you might learn something new :) |
| 29 | +
|
| 30 | +### Scripts in `package.json` |
| 31 | +Several npm scripts are predefined for your convenience. You can run them using `npm run <scriptname>` |
| 32 | +| Script name | Description | |
| 33 | +|-------------|----------------------------------------------------------| |
| 34 | +| `test:package` | Ensures your `package.json` and `io-package.json` are valid. | |
| 35 | +| `test` | Performs a minimal test run on package files. | |
| 36 | +
|
| 37 | +### Publishing the widget |
| 38 | +Since you have chosen GitHub Actions as your CI service, you can |
| 39 | +enable automatic releases on npm whenever you push a new git tag that matches the form |
| 40 | +`v<major>.<minor>.<patch>`. The necessary steps are described in `.github/workflows/test-and-release.yml`. |
| 41 | +
|
| 42 | +To get your widget released in ioBroker, please refer to the documentation |
| 43 | +of [ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-latest-repository). |
| 44 | +
|
| 45 | +### Test the adapter manually on a local ioBroker installation |
| 46 | +In order to install the adapter locally without publishing, the following steps are recommended: |
| 47 | +1. Create a tarball from your dev directory: |
| 48 | + ```bash |
| 49 | + npm pack |
| 50 | + ``` |
| 51 | +1. Upload the resulting file to your ioBroker host |
| 52 | +1. Install it locally (The paths are different on Windows): |
| 53 | + ```bash |
| 54 | + cd /opt/iobroker |
| 55 | + npm i /path/to/tarball.tgz |
| 56 | + ``` |
| 57 | +
|
| 58 | +For later updates, the above procedure is not necessary. Just do the following: |
| 59 | +1. Overwrite the changed files in the adapter directory (`/opt/iobroker/node_modules/iobroker.vis-3dmodel`) |
60 | 60 | 1. Execute `iobroker upload vis-3dmodel` on the ioBroker host |
0 commit comments