Migrate the typescript options to a config file
Some configurations settings like `paths` cannot be provided through CLI arguments but only in a configuration file. And when using a configuration file, only a few options (like `--outDir` can still be provided) through the CLI.
This commit is contained in:
		
							parent
							
								
									b5c8849111
								
							
						
					
					
						commit
						bbf11a5783
					
				
							
								
								
									
										13
									
								
								gulpfile.mjs
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								gulpfile.mjs
									
									
									
									
									
								
							| @ -1549,19 +1549,8 @@ gulp.task("jsdoc", function (done) { | |||||||
| 
 | 
 | ||||||
| gulp.task("types", function (done) { | gulp.task("types", function (done) { | ||||||
|   console.log("### Generating TypeScript definitions using `tsc`"); |   console.log("### Generating TypeScript definitions using `tsc`"); | ||||||
|   const args = [ |  | ||||||
|     "target ESNext", |  | ||||||
|     "allowJS", |  | ||||||
|     "declaration", |  | ||||||
|     `outDir ${TYPES_DIR}`, |  | ||||||
|     "strict", |  | ||||||
|     "esModuleInterop", |  | ||||||
|     "forceConsistentCasingInFileNames", |  | ||||||
|     "emitDeclarationOnly", |  | ||||||
|     "moduleResolution node", |  | ||||||
|   ].join(" --"); |  | ||||||
|   exec( |   exec( | ||||||
|     `"node_modules/.bin/tsc" --${args} src/pdf.js web/pdf_viewer.component.js`, |     `"node_modules/.bin/tsc" --outDir ${TYPES_DIR} --project .`, | ||||||
|     done |     done | ||||||
|   ); |   ); | ||||||
| }); | }); | ||||||
|  | |||||||
							
								
								
									
										16
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								tsconfig.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | { | ||||||
|  |   "compilerOptions": { | ||||||
|  |     "target": "ESNext", | ||||||
|  |     "allowJs": true, | ||||||
|  |     "declaration": true, | ||||||
|  |     "strict": true, | ||||||
|  |     "emitDeclarationOnly": true, | ||||||
|  |     "esModuleInterop": true, | ||||||
|  |     "forceConsistentCasingInFileNames": true, | ||||||
|  |     "moduleResolution": "node" | ||||||
|  |   }, | ||||||
|  |   "files": [ | ||||||
|  |     "src/pdf.js", | ||||||
|  |     "web/pdf_viewer.component.js" | ||||||
|  |   ] | ||||||
|  | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user