Skip to content

Commit

Permalink
fix: build and watch script
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Dec 24, 2020
1 parent 76da01d commit 7653276
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 55 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@types/jest": "^26.0.19",
"@types/jpeg-js": "^0.3.0",
"@types/sharp": "^0.26.1",
"concurrently": "^5.3.0",
"jest": "^26.6.3",
"jest-haste-map": "^26.6.2",
"jest-resolve": "^26.6.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/elgato-stream-deck-core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"include": ["src/**/*"],
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"elgato-stream-deck": ["./src/index.ts"]
"elgato-stream-deck-core": ["./src/index.ts"]
},
"types": ["node"]
}
Expand Down
12 changes: 5 additions & 7 deletions packages/elgato-stream-deck-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": [
"src/**/*.ts"
]
"extends": "./tsconfig.build.json",
"exclude": ["node_modules/**"],
"compilerOptions": {
"types": ["jest", "node"]
}
}
2 changes: 1 addition & 1 deletion packages/elgato-stream-deck-web-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"scripts": {
"start": "webpack-dev-server --mode development --color",
"dist": "trash dist && cross-env NODE_ENV=production webpack -p --progress --colors",
"build": "trash dist && cross-env NODE_ENV=production webpack -p --progress --colors",
"lint": "tslint --project tsconfig.json --config ./tslint.json"
},
"dependencies": {
Expand Down
14 changes: 10 additions & 4 deletions packages/elgato-stream-deck-web-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"extends": "../../tsconfig.json",
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*", "dist/**"],
"compilerOptions": {
"lib": ["es6", "dom"],
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"elgato-stream-deck-web-example": ["./src/index.ts"]
},
"lib": ["es6", "dom"],
"types": [],
"declaration": false
},
"include": ["src/**/*.ts"]
}
}
12 changes: 9 additions & 3 deletions packages/elgato-stream-deck-web/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"extends": "./tsconfig.json",
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*", "dist/**"],
"compilerOptions": {
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"elgato-stream-deck-web": ["./src/index.ts"]
},
"lib": ["dom"],
"types": []
},
"exclude": ["node_modules/**", "src/__tests__/**", "src/__mocks__/**"]
}
}
10 changes: 4 additions & 6 deletions packages/elgato-stream-deck-web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.build.json",
"exclude": ["node_modules/**"],
"compilerOptions": {
"lib": ["dom"],
"types": [],
"outDir": "./dist"
},
"include": ["src/**/*.ts"]
"types": ["jest", "node"]
}
}
21 changes: 11 additions & 10 deletions packages/elgato-stream-deck/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"extends": "./tsconfig.json",
"extends": "@sofie-automation/code-standard-preset/ts/tsconfig.lib",
"exclude": ["node_modules/**", "src/**/*spec.ts", "src/**/__tests__/*", "src/**/__mocks__/*"],
"include": ["src/**/*"],
"compilerOptions": {
"types": [
"node"
]
},
"exclude": [
"node_modules/**",
"src/__tests__/**",
"src/__mocks__/**"
]
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"*": ["./node_modules/*"],
"elgato-stream-deck": ["./src/index.ts"]
},
"types": ["node"]
}
}
14 changes: 6 additions & 8 deletions packages/elgato-stream-deck/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": [
"src/**/*.ts"
]
}
"extends": "./tsconfig.build.json",
"exclude": ["node_modules/**"],
"compilerOptions": {
"types": ["jest", "node"]
}
}
26 changes: 14 additions & 12 deletions scripts/exec-tree.js → scripts/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@ const concurrently = require('concurrently');
await concurrently(
[
{
command: 'yarn workspace @companion/module-framework watch',
name: 'FRAMEWORK',
},
{
command: `yarn workspace companion3 ${process.env.ELECTRON ? 'dev-electron' : 'dev-server'}`,
name: 'SERVER',
command: 'yarn workspace elgato-stream-deck-core build:main --watch',
prefixColor: 'bgBlue.bold',
env: {
MONGO_URL: mongoUrl,
DEVELOPER: 1,
},
name: 'CORE',
},
{
command: 'yarn workspace companion3 dev-client',
name: 'CLIENT',
command: 'yarn workspace elgato-stream-deck build:main --watch',
prefixColor: 'bgGreen.bold',
name: 'NODE',
},
{
command: 'yarn workspace elgato-stream-deck-web build:main --watch',
prefixColor: 'bgPink.bold',
name: 'WEB',
},
{
command: 'yarn workspace elgato-stream-deck-web-example start',
prefixColor: 'bgRed.bold',
name: 'DEMO',
},
],
{
Expand Down
45 changes: 42 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,21 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"

concurrently@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.3.0.tgz#7500de6410d043c912b2da27de3202cb489b1e7b"
integrity sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ==
dependencies:
chalk "^2.4.2"
date-fns "^2.0.1"
lodash "^4.17.15"
read-pkg "^4.0.1"
rxjs "^6.5.2"
spawn-command "^0.0.2-1"
supports-color "^6.1.0"
tree-kill "^1.2.2"
yargs "^13.3.0"

connect-history-api-fallback@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
Expand Down Expand Up @@ -2517,6 +2532,11 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"

date-fns@^2.0.1:
version "2.16.1"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b"
integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==

dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
Expand Down Expand Up @@ -2857,7 +2877,7 @@ [email protected]:
version "5.0.0-alpha.0"
dependencies:
detect-browser "^5.2.0"
elgato-stream-deck-core "file:../../.cache/yarn/v6/npm-elgato-stream-deck-web-5.0.0-alpha.0-459dc552-a578-4799-befc-0d55785d8971-1608849110881/node_modules/elgato-stream-deck-core"
elgato-stream-deck-core "file:../../.cache/yarn/v6/npm-elgato-stream-deck-web-5.0.0-alpha.0-ff75e9e9-b6ff-4742-8eec-93df5de195d7-1608850111711/node_modules/elgato-stream-deck-core"

elliptic@^6.5.3:
version "6.5.3"
Expand Down Expand Up @@ -7104,6 +7124,15 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2"
path-type "^3.0.0"

read-pkg@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"
integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc=
dependencies:
normalize-package-data "^2.3.2"
parse-json "^4.0.0"
pify "^3.0.0"

read-pkg@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc"
Expand Down Expand Up @@ -7438,7 +7467,7 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"

rxjs@^6.6.3:
rxjs@^6.5.2, rxjs@^6.6.3:
version "6.6.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
Expand Down Expand Up @@ -7851,6 +7880,11 @@ source-map@^0.7.3:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==

spawn-command@^0.0.2-1:
version "0.0.2-1"
resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0"
integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=

spdx-compare@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/spdx-compare/-/spdx-compare-0.1.2.tgz#b06af3ea34af7437d91a9f449eaf2d2e93c3c8fb"
Expand Down Expand Up @@ -8581,6 +8615,11 @@ trash@^7.0.0:
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9"
integrity sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=

tree-kill@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==

treeify@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8"
Expand Down Expand Up @@ -9411,7 +9450,7 @@ yargs-parser@^4.2.0:
dependencies:
camelcase "^3.0.0"

yargs@^13.3.2:
yargs@^13.3.0, yargs@^13.3.2:
version "13.3.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
Expand Down

0 comments on commit 7653276

Please sign in to comment.