| 
									
										
										
										
											2020-05-17 10:12:13 +00:00
										 |  |  | const path = require("path"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const yaml = require("gulp-yaml"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const translationsSourceDir = path.join(__dirname, "..", "translations"); | 
					
						
							| 
									
										
										
										
											2020-05-19 09:08:28 +00:00
										 |  |  | const translationsJsonDir = path.join(__dirname, "..", "src", "js", "built-temp"); | 
					
						
							| 
									
										
										
										
											2020-05-17 10:12:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-07 07:16:23 +00:00
										 |  |  | function gulptasksTranslations($, gulp) { | 
					
						
							| 
									
										
										
										
											2020-05-17 10:12:13 +00:00
										 |  |  |     gulp.task("translations.convertToJson", () => { | 
					
						
							|  |  |  |         return gulp | 
					
						
							|  |  |  |             .src(path.join(translationsSourceDir, "*.yaml")) | 
					
						
							|  |  |  |             .pipe($.plumber()) | 
					
						
							|  |  |  |             .pipe(yaml({ space: 2, safe: true })) | 
					
						
							|  |  |  |             .pipe(gulp.dest(translationsJsonDir)); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-13 15:59:25 +00:00
										 |  |  |     gulp.task("translations.fullBuild", gulp.series("translations.convertToJson")); | 
					
						
							| 
									
										
										
										
											2020-05-17 10:12:13 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = { | 
					
						
							|  |  |  |     gulptasksTranslations, | 
					
						
							|  |  |  | }; |