Skip to content

Commit e917c0f

Browse files
committed
Single File Components and Tests
1 parent 7e030db commit e917c0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+7445
-71
lines changed

test/all/$board case/all/$board

File renamed without changes.
File renamed without changes.
File renamed without changes.

test/bulb/$board case/bulb/$board

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/dht/$board case/dht/$board

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/neo/$board case/neo/$board

File renamed without changes.
File renamed without changes.
File renamed without changes.

test/ntp/$board case/ntp/$board

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

case/portal/config.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"webproxy": {
3+
"00": { "element": "imkelight:scene/flow" },
4+
"01": { "element": "imkelight:scene/red" },
5+
"02": { "element": "imkelight:scene/green" },
6+
"03": { "element": "imkelight:scene/ok" },
7+
8+
"1a": { "element": "rfbridge2:scene/dinner" },
9+
"1b": { "element": "rfbridge2:scene/tv" },
10+
"1c": { "element": "rfbridge2:scene/bright" },
11+
"1d": { "element": "rfbridge2:scene/off" },
12+
13+
"1e": { "element": "rfbridge2:button/dampf" },
14+
15+
"20": { "element": "plug06:switch/relay" },
16+
"21": { "element": "switch1:switch/relay" },
17+
18+
"30": { "element": "plug02:switch/relay" },
19+
"3a": { "element": "bulb04:switch/en" },
20+
"3b": { "element": "bulb04:color/l" },
21+
22+
"50": { "element": "airding:pms/pm25" },
23+
"51": { "element": "airding:bme680/bd" }
24+
}
25+
}

case/portal/homeding.service

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=HomeDing Service
3+
After=network.target
4+
5+
[Service]
6+
WorkingDirectory=/home/pi/WebFiles
7+
ExecStart=/usr/bin/node app.js
8+
Restart=on-failure
9+
User=pi
10+
# Environment=PORT=8000
11+
12+
[Install]
13+
WantedBy=multi-user.target
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

server/HomeDingServer.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export interface HomeDingServerOptions {
3131

3232
export class HomeDingServer {
3333

34+
CASE_FOLDER = './case/';
35+
3436
// ===== private
3537
private _app: Application = express();
3638
private _api: Router = express.Router();
@@ -142,10 +144,10 @@ export class HomeDingServer {
142144
// #region ===== Setup mocking and proxy elements =====
143145

144146
if (options.case) {
145-
Logger.info(`Starting test case:; ${options.case}...`);
147+
Logger.info(`Starting test case <${options.case}>...`);
146148

147-
if (fs.existsSync(`./test/${options.case}/`)) {
148-
this._caseFolder = `./test/${options.case}/`;
149+
if (fs.existsSync(`${this.CASE_FOLDER}${options.case}/`)) {
150+
this._caseFolder = `${this.CASE_FOLDER}${options.case}/`;
149151
} else if (fs.existsSync(`./case-${options.case}/`)) {
150152
this._caseFolder = `case-${options.case}/`;
151153
} else {

sfc/loader.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class UComponent extends HTMLElement {
7171
}
7272

7373
adoptedCallback() {
74-
// this.info("adoptedCallback", evt);
74+
// this.info("adoptedCallback");
7575
}
7676

7777
attributeChangedCallback(name, oldValue, newValue) {
@@ -94,7 +94,9 @@ class UComponent extends HTMLElement {
9494
} // class UComponent
9595

9696

97+
9798
window.loadComponent = (function() {
99+
console.debug('LOADER', `loadComponent...`);
98100

99101
async function fetchSFC(tagName, folder = '') {
100102
let def;

0 commit comments

Comments
 (0)