mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	build: output into "build" folder again → "dist" will be used for the final output in archive form
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
This commit is contained in:
		
							parent
							
								
									064799e8cb
								
							
						
					
					
						commit
						607f9096aa
					
				@ -10,8 +10,8 @@ COPY . .
 | 
				
			|||||||
RUN npm ci && \
 | 
					RUN npm ci && \
 | 
				
			||||||
    npm run build:prepare-dist && \
 | 
					    npm run build:prepare-dist && \
 | 
				
			||||||
    npm cache clean --force && \
 | 
					    npm cache clean --force && \
 | 
				
			||||||
    rm -rf dist/node_modules && \
 | 
					    rm -rf build/node_modules && \
 | 
				
			||||||
    mv dist/* \
 | 
					    mv build/* \
 | 
				
			||||||
      start-docker.sh \
 | 
					      start-docker.sh \
 | 
				
			||||||
      /usr/src/app/ && \
 | 
					      /usr/src/app/ && \
 | 
				
			||||||
    rm -rf \
 | 
					    rm -rf \
 | 
				
			||||||
 | 
				
			|||||||
@ -10,8 +10,8 @@ COPY . .
 | 
				
			|||||||
RUN npm ci && \
 | 
					RUN npm ci && \
 | 
				
			||||||
    npm run build:prepare-dist && \
 | 
					    npm run build:prepare-dist && \
 | 
				
			||||||
    npm cache clean --force && \
 | 
					    npm cache clean --force && \
 | 
				
			||||||
    rm -rf dist/node_modules && \
 | 
					    rm -rf build/node_modules && \
 | 
				
			||||||
    mv dist/* \
 | 
					    mv build/* \
 | 
				
			||||||
      start-docker.sh \
 | 
					      start-docker.sh \
 | 
				
			||||||
      /usr/src/app/ && \
 | 
					      /usr/src/app/ && \
 | 
				
			||||||
    rm -rf \
 | 
					    rm -rf \
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
import fs from "fs-extra";
 | 
					import fs from "fs-extra";
 | 
				
			||||||
import path from "path";
 | 
					import path from "path";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const DEST_DIR = "./dist";
 | 
					const DEST_DIR = "./build";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const VERBOSE = process.env.VERBOSE;
 | 
					const VERBOSE = process.env.VERBOSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
    "module": "NodeNext",
 | 
					    "module": "NodeNext",
 | 
				
			||||||
    "declaration": false,
 | 
					    "declaration": false,
 | 
				
			||||||
    "sourceMap": true,
 | 
					    "sourceMap": true,
 | 
				
			||||||
    "outDir": "./dist",
 | 
					    "outDir": "./build",
 | 
				
			||||||
    "strict": true,
 | 
					    "strict": true,
 | 
				
			||||||
    "noImplicitAny": true,
 | 
					    "noImplicitAny": true,
 | 
				
			||||||
    "resolveJsonModule": true,
 | 
					    "resolveJsonModule": true,
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
    "module": "NodeNext",
 | 
					    "module": "NodeNext",
 | 
				
			||||||
    "declaration": false,
 | 
					    "declaration": false,
 | 
				
			||||||
    "sourceMap": true,
 | 
					    "sourceMap": true,
 | 
				
			||||||
    "outDir": "./dist",
 | 
					    "outDir": "./build",
 | 
				
			||||||
    "strict": true,
 | 
					    "strict": true,
 | 
				
			||||||
    "noImplicitAny": true,
 | 
					    "noImplicitAny": true,
 | 
				
			||||||
    "resolveJsonModule": true,
 | 
					    "resolveJsonModule": true,
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
    "module": "NodeNext",
 | 
					    "module": "NodeNext",
 | 
				
			||||||
    "declaration": false,
 | 
					    "declaration": false,
 | 
				
			||||||
    "sourceMap": true,
 | 
					    "sourceMap": true,
 | 
				
			||||||
    "outDir": "./dist",
 | 
					    "outDir": "./build",
 | 
				
			||||||
    "strict": true,
 | 
					    "strict": true,
 | 
				
			||||||
    "noImplicitAny": true,
 | 
					    "noImplicitAny": true,
 | 
				
			||||||
    "resolveJsonModule": true,
 | 
					    "resolveJsonModule": true,
 | 
				
			||||||
 | 
				
			|||||||
@ -19,7 +19,7 @@ const config: Configuration = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    output: {
 | 
					    output: {
 | 
				
			||||||
        publicPath: `${assetPath}/app-dist/`,
 | 
					        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"
 | 
					        filename: "[name].js"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    plugins: [
 | 
					    plugins: [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user