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: (
656
656
} ;
657
657
658
658
const dddStylesPartial = done => {
659
+ const currentPartial =
660
+ fs . existsSync ( config . dest . modulesPartial ) &&
661
+ fs . readFileSync ( config . dest . modulesPartial , 'utf8' ) ;
659
662
const SassPartialRegistry = ReactiumGulp . Utils . registryFactory (
660
663
'SassPartialRegistry' ,
661
664
'id' ,
@@ -744,12 +747,15 @@ $assets: (
744
747
{{/each}}
745
748
` ) ;
746
749
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
+ }
753
759
done ( ) ;
754
760
} ;
755
761
You can’t perform that action at this time.
0 commit comments