Skip to content

Commit

Permalink
Add source file support to backend #743
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatrik committed Dec 3, 2023
1 parent aa4c8a2 commit d8e343f
Show file tree
Hide file tree
Showing 7 changed files with 2,930 additions and 9,204 deletions.
1 change: 1 addition & 0 deletions docker/docker-compose/default/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose/pigallery2-only/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose/with-mysql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 (
Expand All @@ -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 =>
Expand Down
Loading

0 comments on commit d8e343f

Please sign in to comment.