You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-11-29 22:48:28 +02:00
Add source file support to backend #743
This commit is contained in:
@@ -18,6 +18,7 @@ services:
|
|||||||
container_name: pigallery2
|
container_name: pigallery2
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production # set to 'debug' for full debug logging
|
- 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:
|
volumes:
|
||||||
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
||||||
- "db-data:/app/data/db"
|
- "db-data:/app/data/db"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ services:
|
|||||||
container_name: pigallery2
|
container_name: pigallery2
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production # set to 'debug' for full debug logging
|
- 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:
|
volumes:
|
||||||
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
||||||
- "db-data:/app/data/db"
|
- "db-data:/app/data/db"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ services:
|
|||||||
container_name: pigallery2
|
container_name: pigallery2
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production # set to 'debug' for full debug logging
|
- 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:
|
volumes:
|
||||||
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
- "./pigallery2/config:/app/data/config" # CHANGE ME
|
||||||
- "db-data:/app/data/db"
|
- "db-data:/app/data/db"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import * as path from 'path';
|
|||||||
import * as util from 'util';
|
import * as util from 'util';
|
||||||
import * as zip from 'gulp-zip';
|
import * as zip from 'gulp-zip';
|
||||||
import * as ts from 'gulp-typescript';
|
import * as ts from 'gulp-typescript';
|
||||||
|
import * as sourcemaps from 'gulp-sourcemaps';
|
||||||
import * as xml2js from 'xml2js';
|
import * as xml2js from 'xml2js';
|
||||||
import * as child_process from 'child_process';
|
import * as child_process from 'child_process';
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// 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.task('build-backend', (): any =>
|
||||||
gulp
|
gulp
|
||||||
.src(['src/common/**/*.ts', 'src/backend/**/*.ts', 'benchmark/**/*.ts'], {
|
.src(['src/common/**/*.ts', 'src/backend/**/*.ts', 'benchmark/**/*.ts'], {
|
||||||
base: '.',
|
base: '.'
|
||||||
})
|
})
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
.pipe(tsBackendProject())
|
.pipe(tsBackendProject())
|
||||||
.js.pipe(gulp.dest('./release'))
|
.pipe(sourcemaps.write('.', {includeContent: false}))
|
||||||
|
.pipe(gulp.dest('./release'))
|
||||||
);
|
);
|
||||||
|
|
||||||
const createDynamicTranslationFile = async (
|
const createDynamicTranslationFile = async (
|
||||||
@@ -56,7 +59,7 @@ const createDynamicTranslationFile = async (
|
|||||||
);
|
);
|
||||||
const translationXml: XLIFF.Root = await xml2js.parseStringPromise(data);
|
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 =>
|
const hasTsTranslation = (cg: XLIFF.ContextGroup): boolean =>
|
||||||
cg.context.findIndex(
|
cg.context.findIndex(
|
||||||
(c: any): boolean =>
|
(c: any): boolean =>
|
||||||
|
|||||||
12151
package-lock.json
generated
12151
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -96,6 +96,7 @@
|
|||||||
"@types/express-jwt": "6.0.4",
|
"@types/express-jwt": "6.0.4",
|
||||||
"@types/fluent-ffmpeg": "2.1.21",
|
"@types/fluent-ffmpeg": "2.1.21",
|
||||||
"@types/gulp": "4.0.10",
|
"@types/gulp": "4.0.10",
|
||||||
|
"@types/gulp-sourcemaps": "^0.0.38",
|
||||||
"@types/gulp-zip": "4.0.2",
|
"@types/gulp-zip": "4.0.2",
|
||||||
"@types/jasmine": "4.3.1",
|
"@types/jasmine": "4.3.1",
|
||||||
"@types/jsonwebtoken": "9.0.1",
|
"@types/jsonwebtoken": "9.0.1",
|
||||||
@@ -120,6 +121,7 @@
|
|||||||
"eslint": "8.36.0",
|
"eslint": "8.36.0",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"gulp-json-editor": "2.5.6",
|
"gulp-json-editor": "2.5.6",
|
||||||
|
"gulp-sourcemaps": "3.0.0",
|
||||||
"gulp-typescript": "5.0.1",
|
"gulp-typescript": "5.0.1",
|
||||||
"gulp-zip": "5.1.0",
|
"gulp-zip": "5.1.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ export class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init(): Promise<void> {
|
async init(): Promise<void> {
|
||||||
|
|
||||||
this.app = express();
|
this.app = express();
|
||||||
LoggerRouter.route(this.app);
|
LoggerRouter.route(this.app);
|
||||||
this.app.set('view engine', 'ejs');
|
this.app.set('view engine', 'ejs');
|
||||||
|
|||||||
Reference in New Issue
Block a user