1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-03-11 14:59:21 +02:00

Add source file support to backend #743

This commit is contained in:
Patrik J. Braun 2023-12-03 09:38:29 +01:00
parent aa4c8a2e35
commit d8e343fe8a
7 changed files with 2946 additions and 9220 deletions

View File

@ -18,6 +18,7 @@ services:
container_name: pigallery2
environment:
- NODE_ENV=production # set to 'debug' for full debug logging
# - NODE_OPTIONS=--enable-source-maps # enable source map support on the backend for development
volumes:
- "./pigallery2/config:/app/data/config" # CHANGE ME
- "db-data:/app/data/db"

View File

@ -5,6 +5,7 @@ services:
container_name: pigallery2
environment:
- NODE_ENV=production # set to 'debug' for full debug logging
# - NODE_OPTIONS=--enable-source-maps # enable source map support on the backend for development
volumes:
- "./pigallery2/config:/app/data/config" # CHANGE ME
- "db-data:/app/data/db"

View File

@ -30,6 +30,7 @@ services:
container_name: pigallery2
environment:
- NODE_ENV=production # set to 'debug' for full debug logging
# - NODE_OPTIONS=--enable-source-maps # enable source map support on the backend for development
volumes:
- "./pigallery2/config:/app/data/config" # CHANGE ME
- "db-data:/app/data/db"

View File

@ -5,6 +5,7 @@ import * as path from 'path';
import * as util from 'util';
import * as zip from 'gulp-zip';
import * as ts from 'gulp-typescript';
import * as sourcemaps from 'gulp-sourcemaps';
import * as xml2js from 'xml2js';
import * as child_process from 'child_process';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@ -39,10 +40,12 @@ const getSwitch = (name: string, def: string = null): string => {
gulp.task('build-backend', (): any =>
gulp
.src(['src/common/**/*.ts', 'src/backend/**/*.ts', 'benchmark/**/*.ts'], {
base: '.',
base: '.'
})
.pipe(sourcemaps.init())
.pipe(tsBackendProject())
.js.pipe(gulp.dest('./release'))
.pipe(sourcemaps.write('.', {includeContent: false}))
.pipe(gulp.dest('./release'))
);
const createDynamicTranslationFile = async (
@ -56,7 +59,7 @@ const createDynamicTranslationFile = async (
);
const translationXml: XLIFF.Root = await xml2js.parseStringPromise(data);
// clean translations, keep only .ts transaltions
// clean translations, keep only .ts translations
const hasTsTranslation = (cg: XLIFF.ContextGroup): boolean =>
cg.context.findIndex(
(c: any): boolean =>

12151
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -96,6 +96,7 @@
"@types/express-jwt": "6.0.4",
"@types/fluent-ffmpeg": "2.1.21",
"@types/gulp": "4.0.10",
"@types/gulp-sourcemaps": "^0.0.38",
"@types/gulp-zip": "4.0.2",
"@types/jasmine": "4.3.1",
"@types/jsonwebtoken": "9.0.1",
@ -120,6 +121,7 @@
"eslint": "8.36.0",
"gulp": "4.0.2",
"gulp-json-editor": "2.5.6",
"gulp-sourcemaps": "3.0.0",
"gulp-typescript": "5.0.1",
"gulp-zip": "5.1.0",
"hammerjs": "2.0.8",

View File

@ -59,7 +59,6 @@ export class Server {
}
async init(): Promise<void> {
this.app = express();
LoggerRouter.route(this.app);
this.app.set('view engine', 'ejs');