@@ -26,33 +26,36 @@ function loadTask(fileName, taskName) {
26
26
return task ( gulp ) ;
27
27
}
28
28
29
- //#######################################################
30
- // A format and enforce task for different sets of files.
31
- //#######################################################
32
29
33
- // All source files.
34
- gulp . task ( 'format:all' , loadTask ( 'format' , 'format' ) ) ;
35
- gulp . task ( 'format:all:enforce' , loadTask ( 'format' , 'enforce' ) ) ;
36
-
37
- // Untracked source code files.
38
- gulp . task ( 'format:untracked' , loadTask ( 'format' , 'format-untracked' ) ) ;
39
- gulp . task ( 'format:untracked:enforce' , loadTask ( 'format' , 'enforce-untracked' ) ) ;
40
-
41
- // Changed, tracked source code files.
42
- gulp . task ( 'format:diff' , loadTask ( 'format' , 'format-diff' ) ) ;
43
- gulp . task ( 'format:diff:enforce' , loadTask ( 'format' , 'enforce-diff' ) ) ;
44
-
45
- // Changed, both tracked and untracked, source code files.
46
- gulp . task ( 'format:changed' , [ 'format:untracked' , 'format:diff' ] ) ;
47
- gulp . task ( 'format:changed:enforce' , [ 'format:untracked:enforce' , 'format:diff:enforce' ] ) ;
48
-
49
- // Alias for `format:changed` that formerly formatted all files.
50
- gulp . task ( 'format' , [ 'format:changed' ] ) ;
51
-
52
- gulp . task ( 'lint' , [ 'format:changed:enforce' ] ) ;
53
30
gulp . task ( 'source-map-test' , loadTask ( 'source-map-test' ) ) ;
54
31
gulp . task ( 'changelog' , loadTask ( 'changelog' ) ) ;
55
32
gulp . task ( 'changelog:zonejs' , loadTask ( 'changelog-zonejs' ) ) ;
56
33
gulp . task ( 'check-env' , ( ) => { /* this is a noop because the env test ran already above */ } ) ;
57
34
gulp . task ( 'cldr:extract' , loadTask ( 'cldr' , 'extract' ) ) ;
58
35
gulp . task ( 'cldr:gen-closure-locale' , loadTask ( 'cldr' , 'closure' ) ) ;
36
+
37
+
38
+ // TODO(josephperrott): Remove old task entries and deprecation notice after deprecation period.
39
+ /** Notify regarding `gulp format:*` deprecation. */
40
+ function gulpFormatDeprecationNotice ( ) {
41
+ console . info ( `######################################################################` )
42
+ console . info ( `gulp format is deprecated in favor of running the formatter via ng-dev` ) ;
43
+ console . info ( ) ;
44
+ console . info ( `You can find more usage information by running:` ) ;
45
+ console . info ( ` yarn ng-dev format --help` ) ;
46
+ console . info ( ) ;
47
+ console . info ( `For more on the rationale and effects of this deprecation visit:` ) ;
48
+ console . info ( ` https://github.com/angular/angular/pull/36726#issue-406278018` ) ;
49
+ console . info ( `######################################################################` )
50
+ process . exit ( 1 ) ;
51
+ }
52
+ gulp . task ( 'format:all' , gulpFormatDeprecationNotice ) ;
53
+ gulp . task ( 'format:all:enforce' , gulpFormatDeprecationNotice ) ;
54
+ gulp . task ( 'format:untracked' , gulpFormatDeprecationNotice ) ;
55
+ gulp . task ( 'format:untracked:enforce' , gulpFormatDeprecationNotice ) ;
56
+ gulp . task ( 'format:diff' , gulpFormatDeprecationNotice ) ;
57
+ gulp . task ( 'format:diff:enforce' , gulpFormatDeprecationNotice ) ;
58
+ gulp . task ( 'format:changed' , gulpFormatDeprecationNotice ) ;
59
+ gulp . task ( 'format:changed:enforce' , gulpFormatDeprecationNotice ) ;
60
+ gulp . task ( 'format' , gulpFormatDeprecationNotice ) ;
61
+ gulp . task ( 'lint' , gulpFormatDeprecationNotice ) ;
0 commit comments