| 
									
										
										
										
											2017-05-26 00:38:33 -07:00
										 |  |  | const fs = require('fs'); | 
					
						
							|  |  |  | const sh = require('shelljs'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PATCH_LOCK = 'node_modules/@angular/cli/models/webpack-configs/.patched'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if (!fs.existsSync(PATCH_LOCK)) { | 
					
						
							| 
									
										
										
										
											2017-06-13 12:43:26 +01:00
										 |  |  |   sh.exec('patch -p0 -i tools/cli-patches/ngo-loader.patch'); | 
					
						
							|  |  |  |   sh.exec('patch -p0 -i node_modules/purify/angular-cli.patch'); | 
					
						
							|  |  |  |   sh.exec('patch -p0 -i tools/cli-patches/scope-hoisting.patch'); | 
					
						
							|  |  |  |   sh.exec('patch -p0 -i tools/cli-patches/uglify-config.patch'); | 
					
						
							| 
									
										
										
										
											2017-05-26 00:38:33 -07:00
										 |  |  |   sh.touch(PATCH_LOCK); | 
					
						
							|  |  |  | } |