Remove watch scripts
authorChocobozzz <me@florianbigard.com>
Tue, 17 Dec 2019 14:33:58 +0000 (15:33 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 18 Dec 2019 09:14:24 +0000 (10:14 +0100)
client/src/standalone/player/package.json
package.json
scripts/build/client.sh
scripts/build/embed.sh [new file with mode: 0755]
scripts/build/index.sh [new file with mode: 0755]
scripts/dev/client.sh
scripts/dev/embed.sh [new file with mode: 0644]
scripts/dev/server.sh
scripts/watch/client.sh [deleted file]
scripts/watch/server.sh [deleted file]

index a521515e584ee911858c70290321da4541980a8d..b056de718f2632f90d0a820f67adb0bdf063e42d 100644 (file)
@@ -13,6 +13,7 @@
     "peertube",
     "embed"
   ],
+  "main": "./player.ts",
   "author": "Chocobozzz",
   "license": "AGPL-3.0",
   "bugs": {
index 5c12bd33c8878e60daffd5623033afe6e258daa0..acc4b7e1f375d7c17039ba3fac94f47b0300f34c 100644 (file)
     "e2e": "scripty",
     "e2e:local": "scripty",
     "setup:cli": "scripty",
-    "build": "SCRIPTY_PARALLEL=true scripty",
+    "build": "scripty",
+    "build:embed": "scripty",
     "build:server": "scripty",
     "build:client": "scripty",
     "clean:client": "scripty",
     "clean:server": "scripty",
     "clean:server:test": "scripty",
-    "watch:client": "scripty",
-    "watch:server": "scripty",
     "danger:clean:dev": "scripty",
     "danger:clean:prod": "scripty",
     "danger:clean:modules": "scripty",
     "play": "scripty",
     "dev": "scripty",
     "dev:server": "scripty",
+    "dev:embed": "scripty",
     "dev:client": "scripty",
     "dev:cli": "scripty",
+    "dev:embed": "scripty",
     "start": "node dist/server",
     "start:server": "node dist/server --no-client",
     "update-host": "node ./dist/scripts/update-host.js",
index 2518702cffa4cc304a87322f975c99bfe79aad7d..fd9190660023e01cb2e336629c4a493ad2ae64f2 100755 (executable)
@@ -62,7 +62,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
     done
 fi
 
-NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json"
+npm run build:embed
 
 # Copy runtime locales
 cp -r "./src/locale" "./dist/locale"
diff --git a/scripts/build/embed.sh b/scripts/build/embed.sh
new file mode 100755 (executable)
index 0000000..ea5e7d5
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -eu
+
+NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json"
diff --git a/scripts/build/index.sh b/scripts/build/index.sh
new file mode 100755 (executable)
index 0000000..fde6efe
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -eu
+
+npm run concurrently -- -k \
+  "npm run build:client" \
+  "npm run build:server"
index c630de2c4362e392cd4ed58255be871520c8faf0..d6669ed782be292738055f13fdb315cc947f1a49 100755 (executable)
@@ -3,5 +3,5 @@
 set -eu
 
 NODE_ENV=test npm run concurrently -- -k \
-  "npm run watch:client" \
+  "cd client && npm run ng -- serve --proxy-config proxy.config.json --hmr --configuration hmr --host 0.0.0.0 --disable-host-check --port 3000" \
   "npm run build:server && NODE_ENV=test npm start"
diff --git a/scripts/dev/embed.sh b/scripts/dev/embed.sh
new file mode 100644 (file)
index 0000000..9b0ef27
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -eu
+
+NODE_ENV=test npm run concurrently -- -k \
+  "cd client && npm run webpack -- --config webpack/webpack.video-embed.js --mode development --watch" \
+  "npm run build:server && NODE_ENV=test npm start"
index beee5b8d49e4aacdd9e22a0eb10712f30dfb2ae3..a7fa88fbd880d9637bad92f4f1a400f9a0f47bef 100755 (executable)
@@ -7,4 +7,19 @@ if [ ! -f "./client/dist/en-US/index.html" ]; then
   npm run build:client -- --light
 fi
 
-npm run watch:server
+# Copy locales
+mkdir -p "./client/dist"
+rm -rf "./client/dist/locale"
+cp -r "./client/src/locale" "./client/dist/locale"
+
+rm -rf "./dist"
+
+mkdir "./dist"
+cp "./tsconfig.json" "./dist"
+
+npm run tsc -- --incremental --sourceMap
+cp -r ./server/static ./server/assets ./dist/server
+
+NODE_ENV=test npm run concurrently -- -k \
+  "npm run nodemon -- --delay 1 --watch ./dist dist/server" \
+  "npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w"
diff --git a/scripts/watch/client.sh b/scripts/watch/client.sh
deleted file mode 100755 (executable)
index 1d6b8c2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-cd client
-
-npm run ng -- serve --proxy-config proxy.config.json --hmr --configuration hmr --host 0.0.0.0 --disable-host-check --port 3000
diff --git a/scripts/watch/server.sh b/scripts/watch/server.sh
deleted file mode 100755 (executable)
index 2e32318..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-# Copy locales
-mkdir -p "./client/dist"
-rm -rf "./client/dist/locale"
-cp -r "./client/src/locale" "./client/dist/locale"
-
-rm -rf "./dist"
-
-mkdir "./dist"
-cp "./tsconfig.json" "./dist"
-
-npm run tsc -- --incremental --sourceMap
-cp -r ./server/static ./server/assets ./dist/server
-
-NODE_ENV=test npm run concurrently -- -k \
-  "npm run nodemon -- --delay 1 --watch ./dist dist/server" \
-  "npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w"