@@ -45,24 +45,23 @@ gulp.task('clean.generatedComponents', (done) => {
4545
4646 del . sync ( [
4747 `${ outputFolderPath } /*/**` ,
48- ...skipFromCleaningFiles . flatMap ( keepPattern => {
49- const pathParts = keepPattern . match ( / [ \* \/ ] $ / ) ? keepPattern . split ( '/' ) : [ keepPattern ] ;
48+ ...skipFromCleaningFiles . flatMap ( ( keepPattern ) => {
49+ const pathParts = / [ \* \/ ] $ / . exec ( keepPattern ) ? keepPattern . split ( '/' ) : [ keepPattern ] ;
5050
5151 const patternsToKeep = pathParts . reduce ( ( acc , pathPart ) => {
52-
53- if ( pathPart ) {
54- acc . path += '/' + pathPart ;
52+ if ( pathPart ) {
53+ acc . path += `/${ pathPart } ` ;
5554 acc . patterns . push ( `!${ acc . path } ` ) ;
5655 }
5756
5857 return acc ;
5958 } , {
6059 patterns : [ ] ,
61- path : outputFolderPath . replace ( / \/ $ / , '' )
60+ path : outputFolderPath . replace ( / \/ $ / , '' ) ,
6261 } ) . patterns ;
6362
6463 return patternsToKeep ;
65- } )
64+ } ) ,
6665 ] ) ;
6766
6867 done ( ) ;
@@ -101,7 +100,7 @@ gulp.task('before-generate.preserve-component-files', (done) => {
101100 return ( ) => gulp . src ( src ) . pipe ( gulp . dest ( dest ) ) ;
102101 } ) ;
103102
104- gulp . parallel ( ...tasks ) ( done )
103+ gulp . parallel ( ...tasks ) ( done ) ;
105104} ) ;
106105
107106gulp . task ( 'generate.facades' , gulp . series ( 'generate.moduleFacades' , ( done ) => {
@@ -213,16 +212,16 @@ gulp.task('npm.content', gulp.series(
213212
214213 return gulp . src ( [ `${ cmpConfig . outputPath } /**/collection.json` , ...npmConfig . content ] )
215214 . pipe ( gulp . dest ( npmConfig . distPath ) ) ;
216- }
215+ } ,
217216) ) ;
218217
219218gulp . task ( 'npm.package-json' , ( cb ) => {
220219 const pkgPath = path . join ( '.' , buildConfig . npm . distPath , 'package.json' ) ;
221220 const pkg = require ( `./${ pkgPath } ` ) ;
222221 delete pkg . publishConfig ;
223- fs . writeFileSync ( pkgPath , JSON . stringify ( pkg , null , 2 ) )
222+ fs . writeFileSync ( pkgPath , JSON . stringify ( pkg , null , 2 ) ) ;
224223 cb ( ) ;
225- } )
224+ } ) ;
226225
227226gulp . task ( 'npm.pack' , gulp . series (
228227 'npm.content' ,
@@ -262,11 +261,9 @@ gulp.task('generate-component-names', (done) => {
262261 done ( ) ;
263262} ) ;
264263
265- gulp . task ( 'copy.dist.dx-angular' , ( ) => {
266- return gulp
267- . src ( `${ buildConfig . npm . distPath } /**/*` )
268- . pipe ( gulp . dest ( path . join ( buildConfig . components . testsPath , 'node_modules/devextreme-angular' ) ) ) ;
269- } ) ;
264+ gulp . task ( 'copy.dist.dx-angular' , ( ) => gulp
265+ . src ( `${ buildConfig . npm . distPath } /**/*` )
266+ . pipe ( gulp . dest ( path . join ( buildConfig . components . testsPath , 'node_modules/devextreme-angular' ) ) ) ) ;
270267
271268gulp . task ( 'build.tests' , gulp . series ( 'clean.tests' , 'generate-component-names' , 'copy.dist.dx-angular' , ( ) => {
272269 const config = buildConfig . components ;
@@ -289,7 +286,7 @@ const getKarmaConfig = function (testsPath) {
289286 return karmaConfig . parseConfig ( path . resolve ( './karma.conf.js' ) , {
290287 files : [ { pattern : testsPath , watched : false } ] ,
291288 preprocessors,
292- } , { throwErrors : true } ) ;
289+ } , { throwErrors : true } ) ;
293290} ;
294291
295292gulp . task ( 'test.components.client' , gulp . series ( 'build.tests' , ( done ) => {
@@ -298,6 +295,8 @@ gulp.task('test.components.client', gulp.series('build.tests', (done) => {
298295
299296gulp . task ( 'test.components.server' , gulp . series ( 'build.tests' , ( done ) => {
300297 new karmaServer ( getKarmaConfig ( './karma.server.test.shim.js' ) , done ) . start ( ) ;
298+ } , ( done ) => {
299+ new karmaServer ( getKarmaConfig ( './karma.hydration.test.shim.js' ) , done ) . start ( ) ;
301300} ) ) ;
302301
303302gulp . task ( 'test.components.client.debug' , ( done ) => {
0 commit comments