@@ -43,14 +43,15 @@ gulp.task('build:cross', ['backend:prod:cross', 'build-frontend:cross']);
43
43
/**
44
44
* Builds production version of the frontend application for the default architecture.
45
45
*/
46
- gulp . task ( 'build-frontend' , [ 'localize' , 'locales-for-backend' ] ,
47
- function ( ) { return doRevision ( ) ; } ) ;
46
+ gulp . task (
47
+ 'build-frontend' , [ 'localize' , 'locales-for-backend' ] , function ( ) { return doRevision ( ) ; } ) ;
48
48
49
49
/**
50
50
* Builds production version of the frontend application for all supported architectures.
51
51
*/
52
- gulp . task ( 'build-frontend:cross' , [ 'localize:cross' , 'locales-for-backend:cross' ] ,
53
- function ( ) { return doRevision ( ) ; } ) ;
52
+ gulp . task ( 'build-frontend:cross' , [ 'localize:cross' , 'locales-for-backend:cross' ] , function ( ) {
53
+ return doRevision ( ) ;
54
+ } ) ;
54
55
55
56
/**
56
57
* Localizes all pre-created frontend copies for the default arch, so that they are ready to serve.
@@ -71,15 +72,17 @@ gulp.task('localize:cross', ['frontend-copies:cross'], function() {
71
72
* Copies the locales configuration to the default arch directory.
72
73
* This configuration file is then used by the backend to localize dashboard.
73
74
*/
74
- gulp . task ( 'locales-for-backend' , [ 'clean-dist' ] ,
75
- function ( ) { return localesForBackend ( [ conf . paths . dist ] ) ; } ) ;
75
+ gulp . task ( 'locales-for-backend' , [ 'clean-dist' ] , function ( ) {
76
+ return localesForBackend ( [ conf . paths . dist ] ) ;
77
+ } ) ;
76
78
77
79
/**
78
80
* Copies the locales configuration to each arch directory.
79
81
* This configuration file is then used by the backend to localize dashboard.
80
82
*/
81
- gulp . task ( 'locales-for-backend:cross' , [ 'clean-dist' ] ,
82
- function ( ) { return localesForBackend ( conf . paths . distCross ) ; } ) ;
83
+ gulp . task ( 'locales-for-backend:cross' , [ 'clean-dist' ] , function ( ) {
84
+ return localesForBackend ( conf . paths . distCross ) ;
85
+ } ) ;
83
86
84
87
/**
85
88
* Builds production version of the frontend application for the default architecture
@@ -95,19 +98,20 @@ gulp.task(
95
98
* Builds production versions of the frontend application for all architecures
96
99
* (one copy per locale) and places them under .tmp, preparing them for localization and revision.
97
100
*/
98
- gulp . task ( 'frontend-copies:cross' ,
99
- [
100
- 'fonts:cross' ,
101
- 'icons:cross' ,
102
- 'assets:cross' ,
103
- 'dependency-images:cross' ,
104
- 'index:prod' ,
105
- 'clean-dist' ,
106
- ] ,
107
- function ( ) {
108
- return createFrontendCopies (
109
- conf . arch . list . map ( ( arch ) => path . join ( conf . paths . distPre , arch , 'public' ) ) ) ;
110
- } ) ;
101
+ gulp . task (
102
+ 'frontend-copies:cross' ,
103
+ [
104
+ 'fonts:cross' ,
105
+ 'icons:cross' ,
106
+ 'assets:cross' ,
107
+ 'dependency-images:cross' ,
108
+ 'index:prod' ,
109
+ 'clean-dist' ,
110
+ ] ,
111
+ function ( ) {
112
+ return createFrontendCopies (
113
+ conf . arch . list . map ( ( arch ) => path . join ( conf . paths . distPre , arch , 'public' ) ) ) ;
114
+ } ) ;
111
115
112
116
/**
113
117
* Copies assets to the dist directory for current architecture.
@@ -117,8 +121,8 @@ gulp.task('assets', ['clean-dist'], function() { return assets([conf.paths.distP
117
121
/**
118
122
* Copies assets to the dist directory for all architectures.
119
123
*/
120
- gulp . task ( 'assets:cross' , [ 'clean-dist' ] ,
121
- function ( ) { return assets ( conf . paths . distPublicCross ) ; } ) ;
124
+ gulp . task (
125
+ 'assets:cross' , [ 'clean-dist' ] , function ( ) { return assets ( conf . paths . distPublicCross ) ; } ) ;
122
126
123
127
/**
124
128
* Copies icons to the dist directory for current architecture.
@@ -143,14 +147,16 @@ gulp.task('fonts:cross', ['clean-dist'], function() { return fonts(conf.paths.di
143
147
/**
144
148
* Copies images from dependencies to the dist directory for current architecture.
145
149
*/
146
- gulp . task ( 'dependency-images' , [ 'clean-dist' ] ,
147
- function ( ) { return dependencyImages ( [ conf . paths . distPublic ] ) ; } ) ;
150
+ gulp . task ( 'dependency-images' , [ 'clean-dist' ] , function ( ) {
151
+ return dependencyImages ( [ conf . paths . distPublic ] ) ;
152
+ } ) ;
148
153
149
154
/**
150
155
* Copies images from dependencies to the dist directory for all architectures.
151
156
*/
152
- gulp . task ( 'dependency-images:cross' , [ 'clean-dist' ] ,
153
- function ( ) { return dependencyImages ( conf . paths . distPublicCross ) ; } ) ;
157
+ gulp . task ( 'dependency-images:cross' , [ 'clean-dist' ] , function ( ) {
158
+ return dependencyImages ( conf . paths . distPublicCross ) ;
159
+ } ) ;
154
160
155
161
/**
156
162
* Cleans all build artifacts.
@@ -270,8 +276,10 @@ function assets(outputDirs) {
270
276
*/
271
277
function icons ( outputDirs ) {
272
278
let localizedOutputDirs = createLocalizedOutputs ( outputDirs , 'static' ) ;
273
- return gulp . src ( path . join ( conf . paths . materialIcons , '/**/*.+(woff2|woff|eot|ttf)' ) ,
274
- { base : conf . paths . materialIcons } )
279
+ return gulp
280
+ . src (
281
+ path . join ( conf . paths . materialIcons , '/**/*.+(woff2|woff|eot|ttf)' ) ,
282
+ { base : conf . paths . materialIcons } )
275
283
. pipe ( multiDest ( localizedOutputDirs ) ) ;
276
284
}
277
285
@@ -282,8 +290,8 @@ function icons(outputDirs) {
282
290
*/
283
291
function fonts ( outputDirs ) {
284
292
let localizedOutputDirs = createLocalizedOutputs ( outputDirs , 'fonts' ) ;
285
- return gulp . src ( path . join ( conf . paths . robotoFonts , '/**/*.+(woff2)' ) ,
286
- { base : conf . paths . robotoFonts } )
293
+ return gulp
294
+ . src ( path . join ( conf . paths . robotoFonts , '/**/*.+(woff2)' ) , { base : conf . paths . robotoFonts } )
287
295
. pipe ( multiDest ( localizedOutputDirs ) ) ;
288
296
}
289
297
@@ -294,8 +302,8 @@ function fonts(outputDirs) {
294
302
*/
295
303
function dependencyImages ( outputDirs ) {
296
304
let localizedOutputDirs = createLocalizedOutputs ( outputDirs , 'static/img' ) ;
297
- return gulp . src ( path . join ( conf . paths . jsoneditorImages , '*.png' ) ,
298
- { base : conf . paths . jsoneditorImages } )
305
+ return gulp
306
+ . src ( path . join ( conf . paths . jsoneditorImages , '*.png' ) , { base : conf . paths . jsoneditorImages } )
299
307
. pipe ( multiDest ( localizedOutputDirs ) ) ;
300
308
}
301
309
0 commit comments