2016-10-04 20:39:20 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/**
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * @license
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * Copyright Google Inc. All Rights Reserved.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * Use of this source code is governed by an MIT-style license that can be
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * found in the LICENSE file at https://angular.io/license
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-04-25 14:45:08 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'use strict';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-14 08:10:31 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// This is to ensure that we catch env issues before we error while requiring other dependencies.
							 | 
						
					
						
							
								
									
										
										
										
											2017-02-09 19:58:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								const engines = require('./package.json').engines;
							 | 
						
					
						
							
								
									
										
										
										
											2017-02-23 06:55:25 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								require('./tools/check-environment')({
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  requiredNodeVersion: engines.node,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  requiredNpmVersion: engines.npm,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  requiredYarnVersion: engines.yarn
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								});
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-14 08:10:31 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-05-25 19:54:34 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								const gulp = require('gulp');
							 | 
						
					
						
							
								
									
										
										
										
											2015-11-26 23:45:40 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-02-03 08:10:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// See `tools/gulp-tasks/README.md` for information about task loading.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								function loadTask(fileName, taskName) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  const taskModule = require('./tools/gulp-tasks/' + fileName);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  const task = taskName ? taskModule[taskName] : taskModule;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  return task(gulp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-23 16:23:15 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//#######################################################
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// A format and enforce task for different sets of files.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								//#######################################################
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// All source files.
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:all', loadTask('format', 'format'));
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:all:enforce', loadTask('format', 'enforce'));
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Untracked source code files.
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-10 20:19:14 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:untracked', loadTask('format', 'format-untracked'));
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:untracked:enforce', loadTask('format', 'enforce-untracked'));
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Changed, tracked source code files.
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-07 11:54:47 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:diff', loadTask('format', 'format-diff'));
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:diff:enforce', loadTask('format', 'enforce-diff'));
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// Changed, both tracked and untracked, source code files.
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-10 20:19:14 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:changed', ['format:untracked', 'format:diff']);
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-23 08:53:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('format:changed:enforce', ['format:untracked:enforce', 'format:diff:enforce']);
							 | 
						
					
						
							
								
									
										
										
										
											2019-01-28 16:13:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// Alias for `format:changed` that formerly formatted all files.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								gulp.task('format', ['format:changed']);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-20 12:24:12 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('lint', ['format:changed:enforce']);
							 | 
						
					
						
							
								
									
										
										
										
											2017-09-07 10:16:03 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('source-map-test', loadTask('source-map-test'));
							 | 
						
					
						
							
								
									
										
										
										
											2017-02-22 15:14:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('changelog', loadTask('changelog'));
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-25 23:50:39 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('changelog:zonejs', loadTask('changelog-zonejs'));
							 | 
						
					
						
							
								
									
										
										
										
											2017-02-23 06:55:25 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('check-env', () => {/* this is a noop because the env test ran already above */});
							 | 
						
					
						
							
								
									
										
										
										
											2017-07-20 10:54:07 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('cldr:extract', loadTask('cldr', 'extract'));
							 | 
						
					
						
							
								
									
										
										
										
											2017-08-21 19:11:07 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gulp.task('cldr:gen-closure-locale', loadTask('cldr', 'closure'));
							 |