mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	feat(cli): add build script and unify tests (#3369)
This commit is contained in:
		| @@ -1,8 +0,0 @@ | |||||||
| import type { Config } from 'jest'; |  | ||||||
|  |  | ||||||
| const config: Config = { |  | ||||||
|   preset: 'ts-jest', |  | ||||||
|   setupFilesAfterEnv: ['jest-extended/all'], |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| export default config; |  | ||||||
| @@ -40,10 +40,29 @@ | |||||||
|     "yaml": "^2.3.1" |     "yaml": "^2.3.1" | ||||||
|   }, |   }, | ||||||
|   "scripts": { |   "scripts": { | ||||||
|  |     "build": "tsc --project tsconfig.build.json", | ||||||
|     "lint": "eslint \"src/**/*.ts\" --max-warnings 0", |     "lint": "eslint \"src/**/*.ts\" --max-warnings 0", | ||||||
|     "prepack": "yarn build ", |     "prepack": "yarn build ", | ||||||
|     "test": "jest", |     "test": "jest", | ||||||
|     "test:cov": "jest --coverage", |     "test:cov": "jest --coverage", | ||||||
|     "format": "prettier --check ." |     "format": "prettier --check ." | ||||||
|  |   }, | ||||||
|  |   "jest": { | ||||||
|  |     "clearMocks": true, | ||||||
|  |     "moduleFileExtensions": [ | ||||||
|  |       "js", | ||||||
|  |       "json", | ||||||
|  |       "ts" | ||||||
|  |     ], | ||||||
|  |     "rootDir": ".", | ||||||
|  |     "testRegex": ".*\\.spec\\.ts$", | ||||||
|  |     "transform": { | ||||||
|  |       "^.+\\.ts$": "ts-jest" | ||||||
|  |     }, | ||||||
|  |     "collectCoverageFrom": [ | ||||||
|  |       "<rootDir>/src/**/*.(t|j)s" | ||||||
|  |     ], | ||||||
|  |     "coverageDirectory": "./coverage", | ||||||
|  |     "testEnvironment": "node" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,7 +0,0 @@ | |||||||
| { |  | ||||||
|   "extends": "../tsconfig", |  | ||||||
|   "compilerOptions": { |  | ||||||
|     "noEmit": true |  | ||||||
|   }, |  | ||||||
|   "references": [{ "path": ".." }] |  | ||||||
| } |  | ||||||
							
								
								
									
										4
									
								
								cli/tsconfig.build.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								cli/tsconfig.build.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | { | ||||||
|  |   "extends": "./tsconfig.json", | ||||||
|  |   "exclude": ["dist", "node_modules", "upload", "test", "**/*spec.ts"] | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user