File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ async function main() {
96
96
}
97
97
}
98
98
packageTransform ( )
99
+ processFilePath . push ( 'package.json' )
99
100
}
100
101
const processFilePathList = processFilePath . join ( '\n' )
101
102
console . log ( `--------------------------------------------------` )
@@ -133,9 +134,12 @@ function processTransformation(
133
134
transformationModule ,
134
135
params as object
135
136
)
136
- fs . writeFileSync ( p , result )
137
- if ( util . inspect ( processFilePath ) . indexOf ( util . inspect ( p ) ) == - 1 ) {
138
- processFilePath . push ( p )
137
+
138
+ if ( fs . readFileSync ( p ) . toString ( ) != result ) {
139
+ fs . writeFileSync ( p , result )
140
+ if ( util . inspect ( processFilePath ) . indexOf ( util . inspect ( p ) ) == - 1 ) {
141
+ processFilePath . push ( p )
142
+ }
139
143
}
140
144
} catch ( e ) {
141
145
console . error ( e )
You can’t perform that action at this time.
0 commit comments