Fix some build scripts and lint
This commit is contained in:
parent
75278e2890
commit
9b3294a849
6 changed files with 15 additions and 11 deletions
|
@ -29,7 +29,6 @@
|
|||
"build:embed": "bash ./scripts/build/embed.sh",
|
||||
"build:server": "bash ./scripts/build/server.sh",
|
||||
"build:client": "bash ./scripts/build/client.sh",
|
||||
"build:types": "tsc -b --verbose types",
|
||||
"clean:client": "bash ./scripts/clean/client/index.sh",
|
||||
"clean:server:test": "bash ./scripts/clean/server/test.sh",
|
||||
"i18n:update": "bash ./scripts/i18n/update.sh",
|
||||
|
|
|
@ -98,6 +98,8 @@ elif [ "$1" = "external-plugins" ]; then
|
|||
|
||||
runTest "$1" 1 $externalPluginsFiles
|
||||
elif [ "$1" = "lint" ]; then
|
||||
npm run build:server
|
||||
|
||||
npm run eslint -- --ext .ts "./server/**/*.ts" "shared/**/*.ts" "scripts/**/*.ts"
|
||||
npm run swagger-cli -- validate support/doc/api/openapi.yaml
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ rm -rf "./dist"
|
|||
mkdir "./dist"
|
||||
cp "./tsconfig.json" "./dist"
|
||||
|
||||
npm run tsc -- --incremental --sourceMap
|
||||
npm run tsc -- -b -v --incremental
|
||||
cp -r ./server/static ./server/assets ./dist/server
|
||||
cp -r "./server/lib/emails" "./dist/server/lib"
|
||||
|
||||
NODE_ENV=test node node_modules/.bin/concurrently -k \
|
||||
"node_modules/.bin/nodemon --delay 1 --watch ./dist dist/server" \
|
||||
"node_modules/.bin/tsc --incremental --sourceMap --preserveWatchOutput -w"
|
||||
"node_modules/.bin/tsc -b -w --preserveWatchOutput"
|
||||
|
|
|
@ -2,22 +2,24 @@
|
|||
|
||||
## @peertube/embed-api
|
||||
|
||||
### Build
|
||||
### Build & Publish
|
||||
|
||||
```
|
||||
$ cd client/src/standalone/player/
|
||||
$ npm run build
|
||||
$ npm publish --access=public
|
||||
```
|
||||
|
||||
## @peertube/peertube-types
|
||||
|
||||
Typescript definition files generation is controlled by the various `tsconfig.types.json` files, see:
|
||||
Typescript definition files generation is controlled by the various `tsconfig.types.json` files.
|
||||
|
||||
The complete types package is generated via:
|
||||
|
||||
```
|
||||
yarn tsc -b --verbose tsconfig.types.json
|
||||
$ npm run generate-types-package
|
||||
$ cd dist
|
||||
$ npm publish --access=public
|
||||
```
|
||||
|
||||
But the complete types package is generated via:
|
||||
```
|
||||
yarn generate-types-package
|
||||
```
|
||||
> See [scripts/generate-types-package.ts](scripts/generate-types-package.ts) for details.
|
||||
|
|
|
@ -13,6 +13,7 @@ run()
|
|||
|
||||
async function run () {
|
||||
execSync('npm run build:types', { stdio: 'inherit' })
|
||||
|
||||
const typesPath = resolve(cwd(), './types/')
|
||||
const typesDistPath = resolve(cwd(), typesPath, './dist/')
|
||||
const typesDistPackageJsonPath = resolve(typesDistPath, './package.json')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
|
|
Loading…
Reference in a new issue