diff options
-rw-r--r-- | client/src/standalone/player/package.json | 1 | ||||
-rw-r--r-- | package.json | 7 | ||||
-rwxr-xr-x | scripts/build/client.sh | 2 | ||||
-rwxr-xr-x | scripts/build/embed.sh | 5 | ||||
-rwxr-xr-x | scripts/build/index.sh | 7 | ||||
-rwxr-xr-x | scripts/dev/client.sh | 2 | ||||
-rw-r--r-- | scripts/dev/embed.sh | 7 | ||||
-rwxr-xr-x | scripts/dev/server.sh | 17 | ||||
-rwxr-xr-x | scripts/watch/client.sh | 7 | ||||
-rwxr-xr-x | scripts/watch/server.sh | 20 |
10 files changed, 42 insertions, 33 deletions
diff --git a/client/src/standalone/player/package.json b/client/src/standalone/player/package.json index a521515e5..b056de718 100644 --- a/client/src/standalone/player/package.json +++ b/client/src/standalone/player/package.json | |||
@@ -13,6 +13,7 @@ | |||
13 | "peertube", | 13 | "peertube", |
14 | "embed" | 14 | "embed" |
15 | ], | 15 | ], |
16 | "main": "./player.ts", | ||
16 | "author": "Chocobozzz", | 17 | "author": "Chocobozzz", |
17 | "license": "AGPL-3.0", | 18 | "license": "AGPL-3.0", |
18 | "bugs": { | 19 | "bugs": { |
diff --git a/package.json b/package.json index 5c12bd33c..acc4b7e1f 100644 --- a/package.json +++ b/package.json | |||
@@ -24,14 +24,13 @@ | |||
24 | "e2e": "scripty", | 24 | "e2e": "scripty", |
25 | "e2e:local": "scripty", | 25 | "e2e:local": "scripty", |
26 | "setup:cli": "scripty", | 26 | "setup:cli": "scripty", |
27 | "build": "SCRIPTY_PARALLEL=true scripty", | 27 | "build": "scripty", |
28 | "build:embed": "scripty", | ||
28 | "build:server": "scripty", | 29 | "build:server": "scripty", |
29 | "build:client": "scripty", | 30 | "build:client": "scripty", |
30 | "clean:client": "scripty", | 31 | "clean:client": "scripty", |
31 | "clean:server": "scripty", | 32 | "clean:server": "scripty", |
32 | "clean:server:test": "scripty", | 33 | "clean:server:test": "scripty", |
33 | "watch:client": "scripty", | ||
34 | "watch:server": "scripty", | ||
35 | "danger:clean:dev": "scripty", | 34 | "danger:clean:dev": "scripty", |
36 | "danger:clean:prod": "scripty", | 35 | "danger:clean:prod": "scripty", |
37 | "danger:clean:modules": "scripty", | 36 | "danger:clean:modules": "scripty", |
@@ -44,8 +43,10 @@ | |||
44 | "play": "scripty", | 43 | "play": "scripty", |
45 | "dev": "scripty", | 44 | "dev": "scripty", |
46 | "dev:server": "scripty", | 45 | "dev:server": "scripty", |
46 | "dev:embed": "scripty", | ||
47 | "dev:client": "scripty", | 47 | "dev:client": "scripty", |
48 | "dev:cli": "scripty", | 48 | "dev:cli": "scripty", |
49 | "dev:embed": "scripty", | ||
49 | "start": "node dist/server", | 50 | "start": "node dist/server", |
50 | "start:server": "node dist/server --no-client", | 51 | "start:server": "node dist/server --no-client", |
51 | "update-host": "node ./dist/scripts/update-host.js", | 52 | "update-host": "node ./dist/scripts/update-host.js", |
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 2518702cf..fd9190660 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -62,7 +62,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | |||
62 | done | 62 | done |
63 | fi | 63 | fi |
64 | 64 | ||
65 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json" | 65 | npm run build:embed |
66 | 66 | ||
67 | # Copy runtime locales | 67 | # Copy runtime locales |
68 | cp -r "./src/locale" "./dist/locale" | 68 | cp -r "./src/locale" "./dist/locale" |
diff --git a/scripts/build/embed.sh b/scripts/build/embed.sh new file mode 100755 index 000000000..ea5e7d57d --- /dev/null +++ b/scripts/build/embed.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | 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 index 000000000..fde6efe32 --- /dev/null +++ b/scripts/build/index.sh | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | npm run concurrently -- -k \ | ||
6 | "npm run build:client" \ | ||
7 | "npm run build:server" | ||
diff --git a/scripts/dev/client.sh b/scripts/dev/client.sh index c630de2c4..d6669ed78 100755 --- a/scripts/dev/client.sh +++ b/scripts/dev/client.sh | |||
@@ -3,5 +3,5 @@ | |||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | NODE_ENV=test npm run concurrently -- -k \ | 5 | NODE_ENV=test npm run concurrently -- -k \ |
6 | "npm run watch:client" \ | 6 | "cd client && npm run ng -- serve --proxy-config proxy.config.json --hmr --configuration hmr --host 0.0.0.0 --disable-host-check --port 3000" \ |
7 | "npm run build:server && NODE_ENV=test npm start" | 7 | "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 index 000000000..9b0ef27cf --- /dev/null +++ b/scripts/dev/embed.sh | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | NODE_ENV=test npm run concurrently -- -k \ | ||
6 | "cd client && npm run webpack -- --config webpack/webpack.video-embed.js --mode development --watch" \ | ||
7 | "npm run build:server && NODE_ENV=test npm start" | ||
diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh index beee5b8d4..a7fa88fbd 100755 --- a/scripts/dev/server.sh +++ b/scripts/dev/server.sh | |||
@@ -7,4 +7,19 @@ if [ ! -f "./client/dist/en-US/index.html" ]; then | |||
7 | npm run build:client -- --light | 7 | npm run build:client -- --light |
8 | fi | 8 | fi |
9 | 9 | ||
10 | npm run watch:server | 10 | # Copy locales |
11 | mkdir -p "./client/dist" | ||
12 | rm -rf "./client/dist/locale" | ||
13 | cp -r "./client/src/locale" "./client/dist/locale" | ||
14 | |||
15 | rm -rf "./dist" | ||
16 | |||
17 | mkdir "./dist" | ||
18 | cp "./tsconfig.json" "./dist" | ||
19 | |||
20 | npm run tsc -- --incremental --sourceMap | ||
21 | cp -r ./server/static ./server/assets ./dist/server | ||
22 | |||
23 | NODE_ENV=test npm run concurrently -- -k \ | ||
24 | "npm run nodemon -- --delay 1 --watch ./dist dist/server" \ | ||
25 | "npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w" | ||
diff --git a/scripts/watch/client.sh b/scripts/watch/client.sh deleted file mode 100755 index 1d6b8c2aa..000000000 --- a/scripts/watch/client.sh +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | cd client | ||
6 | |||
7 | 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 index 2e3231865..000000000 --- a/scripts/watch/server.sh +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | # Copy locales | ||
6 | mkdir -p "./client/dist" | ||
7 | rm -rf "./client/dist/locale" | ||
8 | cp -r "./client/src/locale" "./client/dist/locale" | ||
9 | |||
10 | rm -rf "./dist" | ||
11 | |||
12 | mkdir "./dist" | ||
13 | cp "./tsconfig.json" "./dist" | ||
14 | |||
15 | npm run tsc -- --incremental --sourceMap | ||
16 | cp -r ./server/static ./server/assets ./dist/server | ||
17 | |||
18 | NODE_ENV=test npm run concurrently -- -k \ | ||
19 | "npm run nodemon -- --delay 1 --watch ./dist dist/server" \ | ||
20 | "npm run tsc -- --incremental --sourceMap --preserveWatchOutput -w" | ||