File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 37
37
"test-image" : " node tasks/test_image.js" ,
38
38
"test-image-gl2d" : " node tasks/test_image.js gl2d_* --queue" ,
39
39
"test-export" : " node tasks/test_export.js" ,
40
- "test-syntax" : " node tasks/test_syntax.js && npm run find-strings" ,
40
+ "test-syntax" : " node tasks/test_syntax.js && npm run find-strings -- --no-output " ,
41
41
"test-bundle" : " node tasks/test_bundle.js" ,
42
42
"test" : " npm run test-jasmine && npm run test-bundle && npm run test-image && npm run test-image-gl2d && npm run test-syntax && npm run lint" ,
43
43
"start-test_dashboard" : " node devtools/test_dashboard/server.js" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ var EXIT_CODE = 0;
13
13
14
14
var localizeRE = / ( ^ | [ \. ] ) ( _ | l o c a l i z e ) $ / ;
15
15
16
+ var noOutput = process . argv . indexOf ( '--no-output' ) !== - 1 ;
17
+
16
18
// main
17
19
findLocaleStrings ( ) ;
18
20
@@ -70,11 +72,16 @@ function findLocaleStrings() {
70
72
}
71
73
72
74
if ( ! EXIT_CODE ) {
73
- var strings = Object . keys ( dict ) . sort ( ) . map ( function ( k ) {
74
- return k + spaces ( maxLen - k . length ) + ' // ' + dict [ k ] ;
75
- } ) . join ( '\n' ) ;
76
- common . writeFile ( constants . pathToTranslationKeys , strings ) ;
77
- console . log ( 'ok find_locale_strings' ) ;
75
+ if ( noOutput ) {
76
+ console . log ( 'ok find_locale_strings - no output requested.' ) ;
77
+ }
78
+ else {
79
+ var strings = Object . keys ( dict ) . sort ( ) . map ( function ( k ) {
80
+ return k + spaces ( maxLen - k . length ) + ' // ' + dict [ k ] ;
81
+ } ) . join ( '\n' ) ;
82
+ common . writeFile ( constants . pathToTranslationKeys , strings ) ;
83
+ console . log ( 'ok find_locale_strings - wrote new key file.' ) ;
84
+ }
78
85
}
79
86
} ) ;
80
87
}
You can’t perform that action at this time.
0 commit comments