mirror of https://github.com/espruino/BangleApps
make tsconfig work for all ts apps
parent
15d24ac1b3
commit
96b099b10a
|
@ -16,7 +16,12 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: npm i
|
||||
run: npm i
|
||||
- name: npm ci
|
||||
working-directory: ./typescript
|
||||
run: npm ci
|
||||
- name: build types
|
||||
working-directory: ./typescript
|
||||
run: npm run build:types
|
||||
- name: build all TS apps
|
||||
working-directory: ./typescript
|
||||
run: npm run build:types
|
||||
|
|
|
@ -4763,7 +4763,7 @@
|
|||
"tags": "widget",
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"storage": [
|
||||
{"name":"widChargingStatus.wid.js","url":"./dist/widget.js"}
|
||||
{"name":"widChargingStatus.wid.js","url":"./widget.js"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
(function () {
|
||||
var icon = require('heatshrink').decompress(atob('ikggMAiEAgYIBmEAg4EB+EAh0AgPggEeCAIEBnwQBAgP+gEP//x///j//8f//k///H//4BYOP/4lBv4bDvwEB4EAvAEBwEAuA7DCAI7BgAQBhEAA'));
|
||||
var iconWidth = 18;
|
||||
"use strict";
|
||||
(() => {
|
||||
const icon = require('heatshrink').decompress(atob('ikggMAiEAgYIBmEAg4EB+EAh0AgPggEeCAIEBnwQBAgP+gEP//x///j//8f//k///H//4BYOP/4lBv4bDvwEB4EAvAEBwEAuA7DCAI7BgAQBhEAA'));
|
||||
const iconWidth = 18;
|
||||
function draw() {
|
||||
g.reset();
|
||||
if (Bangle.isCharging()) {
|
||||
g.setColor('#FD0');
|
||||
g.drawImage(icon, this.x + 1, this.y + 1, {
|
||||
scale: 0.6875
|
||||
scale: 0.6875,
|
||||
});
|
||||
}
|
||||
}
|
||||
WIDGETS.chargingStatus = {
|
||||
area: 'tr',
|
||||
width: Bangle.isCharging() ? iconWidth : 0,
|
||||
draw: draw
|
||||
draw,
|
||||
};
|
||||
Bangle.on('charging', function (charging) {
|
||||
var widget = WIDGETS.chargingStatus;
|
||||
Bangle.on('charging', (charging) => {
|
||||
const widget = WIDGETS.chargingStatus;
|
||||
if (widget) {
|
||||
if (charging) {
|
||||
Bangle.buzz();
|
|
@ -7,7 +7,7 @@
|
|||
"typescript": "4.5.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build:example": "tsc ../apps/widChargingStatus/widget.ts --outDir ../apps/widChargingStatus/dist",
|
||||
"build:apps": "tsc",
|
||||
"build:types": "tsc ./types/globals.d.ts"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
"noUnusedParameters": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["../apps/**/*", "./**/*"]
|
||||
"include": ["../apps/**/*", "./**/*"],
|
||||
"exclude": ["../apps/banglerun", "../apps/hebrew_calendar"]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue