mod-build 4.0.0-alpha.19c → 4.0.0-alpha.19d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.0-alpha.19c",
3
+ "version": "4.0.0-alpha.19d",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -170,10 +170,7 @@ const handlebarsHelpers = [
170
170
  ]
171
171
 
172
172
  export const updateConfig = (config) => {
173
- const tempConfig = config;
174
- const configData = fs.readFileSync('src/.tmp/config.json', 'utf8');
175
- const parsedConfig = JSON.parse(configData);
176
- const mergedConfig = merge(tempConfig, parsedConfig);
173
+ let mergedConfig = config;
177
174
 
178
175
  return {
179
176
  name: 'update-config',
@@ -185,6 +182,7 @@ export const updateConfig = (config) => {
185
182
  const tempConfig = config;
186
183
  const configData = fs.readFileSync('src/.tmp/config.json', 'utf8');
187
184
  const parsedConfig = JSON.parse(configData);
185
+ mergedConfig = merge(tempConfig, parsedConfig);
188
186
  // overwrite the config file with new data
189
187
  fs.writeFileSync('src/.tmp/config.json', JSON.stringify(mergedConfig, null, 2));
190
188
  } catch (error) {