Move CLI dependencies in their own package.json

This commit is contained in:
Chocobozzz 2019-05-24 15:48:48 +02:00 committed by Chocobozzz
parent ff747e7940
commit 7e9d3f259d
11 changed files with 3015 additions and 1413 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
# NPM instalation
/node_modules/
/server/tools/node_modules
*npm-debug.log
# Testing

View file

@ -23,6 +23,7 @@
"scripts": {
"e2e": "scripty",
"e2e:local": "scripty",
"setup:cli": "scripty",
"build": "SCRIPTY_PARALLEL=true scripty",
"build:server": "scripty",
"build:client": "scripty",
@ -92,7 +93,6 @@
},
"dependencies": {
"apicache": "^1.4.0",
"application-config": "^1.0.1",
"async": "^2.0.0",
"async-lru": "^1.1.1",
"bcrypt": "3.0.5",
@ -148,7 +148,6 @@
"sitemap": "^2.1.0",
"socket.io": "^2.2.0",
"srt-to-vtt": "^1.1.2",
"summon-install": "^0.4.3",
"useragent": "^2.3.0",
"uuid": "^3.1.0",
"validator": "^10.2.0",
@ -220,8 +219,5 @@
"scripty": {
"silent": true
},
"summon": {
"silent": true
},
"sasslintConfig": "client/.sass-lint.yml"
}

16
scripts/setup/cli.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
set -eu
NOCLIENT=1 yarn install --pure-lockfile
rm -rf ./dist/server/tools/
(
cd ./server/tools
yarn install --pure-lockfile
)
npm run tsc -- --build ./server/tools/tsconfig.json
cp -r "./server/tools/node_modules" "./dist/server/tools"

View file

@ -28,7 +28,8 @@ elif [ "$1" = "api-3" ]; then
npm run build:server
sh ./server/tests/api/travis-3.sh 2
elif [ "$1" = "api-4" ]; then
npm run build:server
npm run setup:cli
npm run build-server
sh ./server/tests/api/travis-4.sh 2
elif [ "$1" = "lint" ]; then
npm run tslint -- --project ./tsconfig.json -c ./tslint.json server.ts "server/**/*.ts" "shared/**/*.ts"

12
server/tools/package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "@peertube/cli",
"version": "1.0.0",
"private": true,
"dependencies": {
"application-config": "^1.0.1",
"summon-install": "^0.4.6"
},
"summon": {
"silent": true
}
}

0
server/tools/peertube.ts Executable file → Normal file
View file

View file

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"exclude": [ ] // Overwrite exclude property
}

2913
server/tools/yarn.lock Normal file

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,7 @@ You need to follow all the following steps even if you are on a PeerTube server
### Dependencies
Install the [PeerTube dependencies](dependencies.md).
Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis.
### Installation
@ -44,18 +44,14 @@ Clone the PeerTube repo to get the latest version (even if you are on your PeerT
```
$ git clone https://github.com/Chocobozzz/PeerTube.git
$ CLONE="$(pwd)/PeerTube"
$ cd ${CLONE}
```
Run ``yarn install --pure-lockfile``
```
$ cd ${CLONE}
$ yarn install --pure-lockfile
```
Install dependencies and build CLI tools:
Build server tools:
```
$ cd ${CLONE}
$ npm run build:server
$ NOCLIENT=1 yarn install --pure-lockfile
$ npm run setup:cli
```
### CLI wrapper

View file

@ -17,6 +17,7 @@
"typeRoots": [ "node_modules/@types", "server/typings" ]
},
"exclude": [
"server/tools/",
"client/node_modules",
"node_modules",
"dist",

1458
yarn.lock

File diff suppressed because it is too large Load diff