File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -656,6 +656,9 @@ $assets: (
656656 } ;
657657
658658 const dddStylesPartial = done => {
659+ const currentPartial =
660+ fs . existsSync ( config . dest . modulesPartial ) &&
661+ fs . readFileSync ( config . dest . modulesPartial , 'utf8' ) ;
659662 const SassPartialRegistry = ReactiumGulp . Utils . registryFactory (
660663 'SassPartialRegistry' ,
661664 'id' ,
@@ -744,12 +747,15 @@ $assets: (
744747{{/each}}
745748` ) ;
746749
747- fs . ensureFileSync ( config . dest . modulesPartial ) ;
748- fs . writeFileSync (
749- config . dest . modulesPartial ,
750- template ( stylePartials ) ,
751- 'utf8' ,
752- ) ;
750+ const newPartial = template ( stylePartials ) ;
751+ if ( currentPartial !== newPartial ) {
752+ fs . ensureFileSync ( config . dest . modulesPartial ) ;
753+ fs . writeFileSync (
754+ config . dest . modulesPartial ,
755+ template ( stylePartials ) ,
756+ 'utf8' ,
757+ ) ;
758+ }
753759 done ( ) ;
754760 } ;
755761
You can’t perform that action at this time.
0 commit comments