Clean up build process

This commit is contained in:
2021-08-04 23:18:55 -04:00
parent 2e300a9964
commit 3c5e3324a7
9 changed files with 31 additions and 13 deletions

View File

@@ -1,5 +1,9 @@
FROM node FROM node
RUN mkdir /app
RUN cd /app
WORKDIR /app
COPY package.json package.json COPY package.json package.json
COPY package-lock.json package-lock.json COPY package-lock.json package-lock.json
@@ -7,6 +11,7 @@ RUN npm install
COPY . . COPY . .
RUN npm run build RUN npm run ng build api --configuration production
RUN npm run ng build client
CMD [ "npm", "run", "prod" ] CMD [ "npm", "run", "prod" ]

View File

@@ -1,6 +1,6 @@
import { Controller, Get } from '@nestjs/common'; import { Controller, Get } from '@nestjs/common';
import { Message } from '@vidgrab2/api-interfaces'; import { Message } from '@vidgrab/api-interfaces';
import { AppService } from './app.service'; import { AppService } from './app.service';

View File

@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Message } from '@vidgrab2/api-interfaces'; import { Message } from '@vidgrab/api-interfaces';
@Injectable() @Injectable()
export class AppService { export class AppService {

View File

@@ -9,7 +9,7 @@ import {
import { pick } from 'lodash'; import { pick } from 'lodash';
import { Server, Socket } from 'socket.io'; import { Server, Socket } from 'socket.io';
import { JobEvent } from '@vidgrab2/api-interfaces'; import { JobEvent } from '@vidgrab/api-interfaces';
@WebSocketGateway() @WebSocketGateway()
export class JobGateway implements OnGatewayConnection, OnGatewayDisconnect { export class JobGateway implements OnGatewayConnection, OnGatewayDisconnect {

View File

@@ -18,7 +18,7 @@ import { ConfigService } from '@nestjs/config';
import { Queue } from 'bull'; import { Queue } from 'bull';
import { pick, trimEnd } from 'lodash'; import { pick, trimEnd } from 'lodash';
import { QueueDto, UploadDto } from '@vidgrab2/api-interfaces'; import { QueueDto, UploadDto } from '@vidgrab/api-interfaces';
import { YtdlService } from '../ytdl/ytdl.service'; import { YtdlService } from '../ytdl/ytdl.service';
@Controller() @Controller()

View File

@@ -13,7 +13,7 @@ import { EventEmitter2 } from '@nestjs/event-emitter';
import { Job } from 'bull'; import { Job } from 'bull';
import { throttle } from 'lodash'; import { throttle } from 'lodash';
import * as split from 'split2'; import * as split from 'split2';
import { QueueDto } from '@vidgrab2/api-interfaces'; import { QueueDto } from '@vidgrab/api-interfaces';
import { raw } from 'youtube-dl-exec'; import { raw } from 'youtube-dl-exec';
@Processor('vidgrab') @Processor('vidgrab')

View File

@@ -1,5 +1,5 @@
{ {
"npmScope": "vidgrab2", "npmScope": "vidgrab",
"affected": { "affected": {
"defaultBase": "master" "defaultBase": "master"
}, },
@@ -14,7 +14,12 @@
"default": { "default": {
"runner": "@nrwl/workspace/tasks-runners/default", "runner": "@nrwl/workspace/tasks-runners/default",
"options": { "options": {
"cacheableOperations": ["build", "lint", "test", "e2e"] "cacheableOperations": [
"build",
"lint",
"test",
"e2e"
]
} }
} }
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "vidgrab2", "name": "vidgrab",
"version": "0.0.0", "version": "0.0.0",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
@@ -10,7 +10,7 @@
"start:fe:prod": "sleep 10 && ng serve client --prod", "start:fe:prod": "sleep 10 && ng serve client --prod",
"start:be": "ng serve api", "start:be": "ng serve api",
"start:be:prod": "node dist/apps/api/main.js", "start:be:prod": "node dist/apps/api/main.js",
"build": "ng build api --prod && ng build client", "build": "ng build api --configuration production && ng build client",
"test": "ng test", "test": "ng test",
"lint": "nx workspace-lint && ng lint", "lint": "nx workspace-lint && ng lint",
"dev": "concurrently -p=\"{name}\" -n=\"Next,NestJS\" -c=\"green,blue\" \"npm run start:fe\" \"npm run start:be\"", "dev": "concurrently -p=\"{name}\" -n=\"Next,NestJS\" -c=\"green,blue\" \"npm run start:fe\" \"npm run start:be\"",

View File

@@ -10,13 +10,21 @@
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es2015",
"module": "esnext", "module": "esnext",
"lib": ["es2017", "dom"], "lib": [
"es2017",
"dom"
],
"skipLibCheck": true, "skipLibCheck": true,
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@vidgrab2/api-interfaces": ["libs/api-interfaces/src/index.ts"] "@vidgrab/api-interfaces": [
"libs/api-interfaces/src/index.ts"
]
} }
}, },
"exclude": ["node_modules", "tmp"] "exclude": [
"node_modules",
"tmp"
]
} }