From 36870295c4827a69c7133f2907ba3cd3e5036208 Mon Sep 17 00:00:00 2001 From: Sylvie Date: Mon, 27 Nov 2023 10:23:27 -0700 Subject: [PATCH] build: use `dist/` subdirs for output now --- backend/routers/_frontend.ts | 2 +- backend/tsconfig.json | 2 +- common/fix-frontend-js.js | 2 +- frontend/tsconfig.json | 2 +- package.json | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/routers/_frontend.ts b/backend/routers/_frontend.ts index 9a84c9c..13eaf53 100644 --- a/backend/routers/_frontend.ts +++ b/backend/routers/_frontend.ts @@ -24,7 +24,7 @@ export const buildFrontendRouter = (page: string, onConfigReady = true) => { // Load frontend JS router.get('/ui.js', (_req, res) => ready() - ? res.type('text/javascript').sendFile(path.join(`dist-frontend/${page}.mjs`)) + ? res.type('text/javascript').sendFile(path.join(`dist/frontend/${page}.mjs`)) : res.sendStatus(403)); return router; diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 7888404..e9d6f21 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { - "outDir": "../dist-backend", + "outDir": "../dist/backend", "strictPropertyInitialization": false }, "include": [ diff --git a/common/fix-frontend-js.js b/common/fix-frontend-js.js index 4bd00a1..010336f 100644 --- a/common/fix-frontend-js.js +++ b/common/fix-frontend-js.js @@ -3,7 +3,7 @@ const { path } = require('@tycrek/joint'); const log = new (require('@tycrek/log').TLog)(); const FILES = { - prefix: 'dist-frontend', + prefix: 'dist/frontend', suffix: '.mjs', pages: [ 'setup', diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index cc3cd25..0543b09 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { - "outDir": "../dist-frontend", + "outDir": "../dist/frontend", "lib": [ "ES2022", "DOM" diff --git a/package.json b/package.json index 27c46b1..3dacc53 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ass", "version": "0.15.0-indev", "description": "The simple self-hosted ShareX server", - "main": "dist-backend/app.js", + "main": "dist/backend/app.js", "engines": { "node": "^20", "npm": "^10" @@ -14,7 +14,7 @@ "build:backend": "tsc -p backend/", "build:frontend": "tsc -p frontend/", "build:fix-frontend": "node common/fix-frontend-js.js", - "start": "node dist-backend/app.js" + "start": "node dist/backend/app.js" }, "repository": "github:tycrek/ass", "keywords": [