@@ -463,53 +463,6 @@ const reactium = (gulp, config, webpackConfig) => {
463
463
// Stub serviceWorker task. Implementation moved to @atomic -reactor/reactium-service-worker plugin
464
464
const serviceWorker = ( ) => Promise . resolve ( ) ;
465
465
466
- const ssg = gulp . series ( task ( 'ssg:flush' ) , task ( 'ssg:warm' ) ) ;
467
-
468
- const ssgFlush = ( ) => {
469
- console . log ( chalk . yellow ( 'Flushing Server Side Generated HTML' ) ) ;
470
- del . sync ( [ config . dest . dist + '/static-html' ] ) ;
471
- return Promise . resolve ( ) ;
472
- } ;
473
-
474
- const ssgWarm = async ( ) => {
475
- console . log ( chalk . green ( 'Warming Server Side Generated HTML' ) ) ;
476
- const serverUrl = `http://localhost:${ port } ` ;
477
-
478
- let paths = [ ] ;
479
- try {
480
- const { data = [ ] } = await axios . get ( serverUrl + '/ssg-paths' ) ;
481
- paths = data ;
482
- } catch ( { response = { } } ) {
483
- const { status, statusText, data } = response ;
484
- const error = op . get ( data , 'error' , { status, statusText, data } ) ;
485
- throw new Error (
486
- `Getting generation paths: ${ JSON . stringify ( error ) } ` ,
487
- ) ;
488
- }
489
-
490
- for ( let chunk of _ . chunk ( paths , 5 ) ) {
491
- try {
492
- await Promise . all (
493
- chunk . map ( warmPath => {
494
- console . log (
495
- chalk . green ( 'Warming URL:' ) ,
496
- chalk . blueBright ( serverUrl + warmPath ) ,
497
- ) ;
498
- return axios
499
- . get ( serverUrl + warmPath )
500
- . catch ( error =>
501
- console . error (
502
- `Error warming ${ serverUrl + warmPath } ` ,
503
- ) ,
504
- ) ;
505
- } ) ,
506
- ) ;
507
- } catch ( error ) {
508
- console . error ( error ) ;
509
- }
510
- }
511
- } ;
512
-
513
466
const staticTask = task ( 'static:copy' ) ;
514
467
515
468
const staticCopy = done => {
@@ -912,9 +865,6 @@ $assets: (
912
865
'serve-restart' : serve ( { open : false } ) ,
913
866
serviceWorker,
914
867
sw,
915
- ssg,
916
- 'ssg:flush' : ssgFlush ,
917
- 'ssg:warm' : ssgWarm ,
918
868
static : staticTask ,
919
869
'static:copy' : staticCopy ,
920
870
'styles:partials' : dddStylesPartial ,
0 commit comments