[Scripts > Minify] Tweak options, include scripts in CI
This commit is contained in:
		
							parent
							
								
									a4491e4e19
								
							
						
					
					
						commit
						58c0e53744
					
				
					 2 changed files with 9 additions and 3 deletions
				
			
		
							
								
								
									
										1
									
								
								.github/workflows/release_nightly.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/release_nightly.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -5,6 +5,7 @@ on: | |||
|     branches: [ main ] | ||||
|     paths: | ||||
|     - 'src/**' | ||||
|     - 'scripts/**' | ||||
|     - 'polyfills/**' | ||||
|     - '.github/workflows/release_nightly.yml' | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,14 +1,19 @@ | |||
| #!/bin/sh | ||||
| rm -rf miniSrc | ||||
| mkdir miniSrc | ||||
| 
 | ||||
| npx esbuild ./src --bundle --platform=node --external:electron --external:original-fs --external:auto-updater --outfile=miniSrc/index.js | ||||
| npx esbuild ./src/splash/preload.js --bundle --platform=node --external:electron --external:original-fs --external:auto-updater --outfile=miniSrc/preload.js | ||||
| npx uglifyjs --compress --mangle -o miniSrc/index.js -- miniSrc/index.js | ||||
| npx uglifyjs --compress --mangle -o miniSrc/preload.js -- miniSrc/preload.js | ||||
| npx uglifyjs --compress --mangle -o miniSrc/mainWindowInject.js -- src/mainWindowInject.js | ||||
| 
 | ||||
| npx uglifyjs --compress --mangle --toplevel -o miniSrc/index.js -- miniSrc/index.js | ||||
| npx uglifyjs --compress --mangle --toplevel -o miniSrc/preload.js -- miniSrc/preload.js | ||||
| npx uglifyjs --compress --mangle --toplevel -o miniSrc/mainWindowInject.js -- src/mainWindowInject.js | ||||
| 
 | ||||
| npx html-minifier --collapse-whitespace --remove-comments --remove-script-type-attributes --remove-tag-whitespace --minify-css true --minify-js true -o miniSrc/index.html -- src/splash/index.html | ||||
| # cp src/splash/index.html miniSrc/ | ||||
| 
 | ||||
| cp src/package.json miniSrc/package.json | ||||
| npx minify-json miniSrc/package.json | ||||
| 
 | ||||
| npx asar pack miniSrc minified.asar | ||||
| # rm -rf miniSrc | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue