Skip to content

Commit

Permalink
chore: further tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 24, 2020
1 parent 7653276 commit f47f13b
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.json
CONTRIBUTING.md
CHANGELOG.md
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"private": true,
"scripts": {
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
"update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'",
"start-web": "cd packages/elgato-stream-deck-web-example && yarn start",
"dist-web": "cd packages/elgato-stream-deck-web-example && yarn dist",
"build": "yarn workspaces run build",
Expand All @@ -28,17 +26,13 @@
"sharp": "^0.27.0",
"standard-version": "^9.0.0",
"stream-buffers": "^3.0.1",
"trash-cli": "^4.0.0",
"ts-jest": "^24.0.2",
"ts-loader": "^6.0.0",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.3.0",
"typescript": "~4.1.3",
"usb-detection": "^4.10.0",
"weallbehave": "^1.2.0",
"weallcontribute": "^1.0.8"
"usb-detection": "^4.10.0"
},
"workspaces": {
"packages": [
Expand Down
21 changes: 9 additions & 12 deletions packages/elgato-stream-deck-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"license": "MIT",
"homepage": "https://github.com/lange/node-elgato-stream-deck#readme",
"homepage": "https://github.com/julusian/node-elgato-stream-deck#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/lange/node-elgato-stream-deck.git"
"url": "git+https://github.com/julusian/node-elgato-stream-deck.git"
},
"bugs": {
"url": "https://github.com/lange/node-elgato-stream-deck/issues"
"url": "https://github.com/julusian/node-elgato-stream-deck/issues"
},
"author": {
"name": "Alex Van Camp",
"email": "[email protected]",
"url": "https://alexvan.camp/",
"twitter": "vancamp"
"name": "Julian Waller",
"email": "[email protected]"
},
"contributors": [
{
Expand All @@ -33,10 +31,6 @@
"twitter": "chrishanel",
"email": "[email protected]",
"url": "http://www.chrishanel.com/"
},
{
"name": "Julian Waller",
"email": "[email protected]"
}
],
"keywords": [
Expand Down Expand Up @@ -66,5 +60,8 @@
},
"files": [
"dist"
]
],
"engines": {
"node": ">=10.10"
}
}
24 changes: 8 additions & 16 deletions packages/elgato-stream-deck-web-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,31 @@
"version": "5.0.0-alpha.0",
"private": true,
"license": "MIT",
"homepage": "https://github.com/lange/node-elgato-stream-deck#readme",
"homepage": "https://github.com/julusian/node-elgato-stream-deck#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/lange/node-elgato-stream-deck.git"
"url": "git+https://github.com/julusian/node-elgato-stream-deck.git"
},
"bugs": {
"url": "https://github.com/lange/node-elgato-stream-deck/issues"
"url": "https://github.com/julusian/node-elgato-stream-deck/issues"
},
"author": {
"name": "Alex Van Camp",
"email": "[email protected]",
"url": "https://alexvan.camp/",
"twitter": "vancamp"
"name": "Julian Waller",
"email": "[email protected]"
},
"contributors": [
{
"name": "Julian Waller",
"email": "[email protected]"
}
],
"scripts": {
"start": "webpack-dev-server --mode development --color",
"build": "trash dist && cross-env NODE_ENV=production webpack -p --progress --colors",
"build": "rimraf dist && cross-env NODE_ENV=production webpack -p --progress --colors",
"lint": "tslint --project tsconfig.json --config ./tslint.json"
},
"dependencies": {
"cross-env": "^7.0.3",
"elgato-stream-deck-web": "file:../elgato-stream-deck-web",
"html-to-image": "^0.1.1"
"html-to-image": "^1.3.20"
},
"devDependencies": {
"copy-webpack-plugin": "^5.0.4",
"ts-loader": "^6.1.0",
"ts-loader": "^8.0.12",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.8",
"webpack-dev-server": "^3.11.0"
Expand Down
20 changes: 6 additions & 14 deletions packages/elgato-stream-deck-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,18 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"license": "MIT",
"homepage": "https://github.com/lange/node-elgato-stream-deck#readme",
"homepage": "https://github.com/julusian/node-elgato-stream-deck#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/lange/node-elgato-stream-deck.git"
"url": "git+https://github.com/julusian/node-elgato-stream-deck.git"
},
"bugs": {
"url": "https://github.com/lange/node-elgato-stream-deck/issues"
"url": "https://github.com/julusian/node-elgato-stream-deck/issues"
},
"author": {
"name": "Alex Van Camp",
"email": "[email protected]",
"url": "https://alexvan.camp/",
"twitter": "vancamp"
"name": "Julian Waller",
"email": "[email protected]"
},
"contributors": [
{
"name": "Julian Waller",
"email": "[email protected]"
}
],
"keywords": [
"elgato",
"stream",
Expand All @@ -37,7 +29,7 @@
"controller"
],
"scripts": {
"build": "trash dist && yarn build:main",
"build": "rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.build.json",
"release": "standard-version",
"watch": "jest --watch",
Expand Down
5 changes: 2 additions & 3 deletions packages/elgato-stream-deck-web/src/jpeg.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export async function encodeJPEG(buffer: Buffer, width: number, height: number): Promise<Buffer> {
const blob = await new Promise((resolve, reject) => {
const blob = await new Promise<Blob>((resolve, reject) => {
const canvas = document.createElement('canvas')
canvas.width = width
canvas.height = height
Expand All @@ -23,6 +23,5 @@ export async function encodeJPEG(buffer: Buffer, width: number, height: number):
reject()
}
})
const buf: ArrayBuffer = await (blob as any).arrayBuffer()
return Buffer.from(buf)
return Buffer.from(await blob.arrayBuffer())
}
2 changes: 1 addition & 1 deletion packages/elgato-stream-deck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"controller"
],
"scripts": {
"build": "trash dist && yarn build:main",
"build": "rimraf dist && yarn build:main",
"build:main": "tsc -p tsconfig.build.json",
"release": "standard-version",
"watch": "jest --watch",
Expand Down
Loading

0 comments on commit f47f13b

Please sign in to comment.