From 607f9096aa5cb373632b355cc70a6c91bad8c3b6 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Sun, 9 Mar 2025 08:29:03 +0100 Subject: [PATCH] =?UTF-8?q?build:=20output=20into=20"build"=20folder=20aga?= =?UTF-8?q?in=20=E2=86=92=20"dist"=20will=20be=20used=20for=20the=20final?= =?UTF-8?q?=20output=20in=20archive=20form?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this will allow for cleaner separation -> build for the output from the build stage (i.e. TS/Webpack + asset copying) and dist for the archive format of the build folder --- Dockerfile | 4 ++-- Dockerfile.alpine | 4 ++-- bin/copy-dist.ts | 2 +- tsconfig.build.json | 2 +- tsconfig.json | 2 +- tsconfig.webpack.json | 2 +- webpack.config.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2436a8124..4aac3160f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,8 @@ COPY . . RUN npm ci && \ npm run build:prepare-dist && \ npm cache clean --force && \ - rm -rf dist/node_modules && \ - mv dist/* \ + rm -rf build/node_modules && \ + mv build/* \ start-docker.sh \ /usr/src/app/ && \ rm -rf \ diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 9370bd6da..f83789399 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -10,8 +10,8 @@ COPY . . RUN npm ci && \ npm run build:prepare-dist && \ npm cache clean --force && \ - rm -rf dist/node_modules && \ - mv dist/* \ + rm -rf build/node_modules && \ + mv build/* \ start-docker.sh \ /usr/src/app/ && \ rm -rf \ diff --git a/bin/copy-dist.ts b/bin/copy-dist.ts index 289334321..19a48eaf0 100644 --- a/bin/copy-dist.ts +++ b/bin/copy-dist.ts @@ -1,7 +1,7 @@ import fs from "fs-extra"; import path from "path"; -const DEST_DIR = "./dist"; +const DEST_DIR = "./build"; const VERBOSE = process.env.VERBOSE; diff --git a/tsconfig.build.json b/tsconfig.build.json index 4d4ffd342..1987c96c0 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,7 +3,7 @@ "module": "NodeNext", "declaration": false, "sourceMap": true, - "outDir": "./dist", + "outDir": "./build", "strict": true, "noImplicitAny": true, "resolveJsonModule": true, diff --git a/tsconfig.json b/tsconfig.json index d94fcef82..c1f3ef48b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "module": "NodeNext", "declaration": false, "sourceMap": true, - "outDir": "./dist", + "outDir": "./build", "strict": true, "noImplicitAny": true, "resolveJsonModule": true, diff --git a/tsconfig.webpack.json b/tsconfig.webpack.json index cbfe8cbdb..ed622818b 100644 --- a/tsconfig.webpack.json +++ b/tsconfig.webpack.json @@ -3,7 +3,7 @@ "module": "NodeNext", "declaration": false, "sourceMap": true, - "outDir": "./dist", + "outDir": "./build", "strict": true, "noImplicitAny": true, "resolveJsonModule": true, diff --git a/webpack.config.ts b/webpack.config.ts index 207ff2fcf..82439ea6d 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -19,7 +19,7 @@ const config: Configuration = { }, output: { publicPath: `${assetPath}/app-dist/`, - path: path.resolve(rootDir, "dist/src/public/app-dist"), + path: path.resolve(rootDir, "build/src/public/app-dist"), filename: "[name].js" }, plugins: [