mod-build 4.0.51-beta.4 → 4.0.51-beta.6
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
package/src/scripts/plugins.js
CHANGED
|
@@ -43,6 +43,7 @@ export const updateConfig = async (config) => {
|
|
|
43
43
|
...footer(config),
|
|
44
44
|
...{ isLocal, nodeEnv, buildPath }
|
|
45
45
|
};
|
|
46
|
+
await addSeasonalchanges(mergedConfig);
|
|
46
47
|
|
|
47
48
|
const checkForTempConfig = () => {
|
|
48
49
|
return new Promise((resolve) => {
|
|
@@ -60,7 +61,6 @@ export const updateConfig = async (config) => {
|
|
|
60
61
|
name: 'update-config',
|
|
61
62
|
async configResolved({ configFileDependencies }) {
|
|
62
63
|
await checkForTempConfig();
|
|
63
|
-
await addSeasonalchanges(mergedConfig);
|
|
64
64
|
|
|
65
65
|
configFileDependencies.forEach((file) => {
|
|
66
66
|
if (file.endsWith('siteconfig.js') || file.endsWith('template.js')) {
|
|
@@ -93,6 +93,7 @@ export const updateHandlebarsOnWatch = async (config) => {
|
|
|
93
93
|
...footer(config),
|
|
94
94
|
...{ isLocal, nodeEnv, buildPath }
|
|
95
95
|
};
|
|
96
|
+
await addSeasonalchanges(mergedConfig);
|
|
96
97
|
|
|
97
98
|
const checkForTempConfig = () => {
|
|
98
99
|
return new Promise((resolve) => {
|
|
@@ -111,7 +112,6 @@ export const updateHandlebarsOnWatch = async (config) => {
|
|
|
111
112
|
enforce: 'pre',
|
|
112
113
|
async configResolved({ configFileDependencies }) {
|
|
113
114
|
await checkForTempConfig();
|
|
114
|
-
await addSeasonalchanges(mergedConfig);
|
|
115
115
|
|
|
116
116
|
configFileDependencies.forEach((file) => {
|
|
117
117
|
if (file.endsWith('siteconfig.js') || file.endsWith('template.js')) {
|
|
@@ -22,7 +22,8 @@ export default async function(tempConfig) {
|
|
|
22
22
|
// Find and reverse the required words in the string using regex group capture
|
|
23
23
|
const processedData = data.replaceAll(regex, '$3 $2 $1');
|
|
24
24
|
// Convert data into JSON
|
|
25
|
-
|
|
25
|
+
const parsed = JSON.parse(processedData);
|
|
26
|
+
Object.assign(tempConfig, parsed);
|
|
26
27
|
// Find the HVACInterest step and reverse the options array
|
|
27
28
|
if (tempConfig.steps && (tempConfig.steps.items && tempConfig.steps.items.length)) {
|
|
28
29
|
tempConfig.steps.items.forEach(function(step) {
|
package/tasks/templates.js
CHANGED
|
@@ -3,7 +3,6 @@ import footer from '../src/data/footer.js';
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import merge from 'lodash.merge';
|
|
5
5
|
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
6
|
-
import addSeasonalchanges from './addSeasonalchanges.js';
|
|
7
6
|
|
|
8
7
|
import { defaultSettings } from '../src/data/config.js';
|
|
9
8
|
|
|
@@ -263,8 +262,6 @@ export default async function(config) {
|
|
|
263
262
|
...{ isLocal, nodeEnv, assetsPath, buildPath },
|
|
264
263
|
};
|
|
265
264
|
|
|
266
|
-
// await addSeasonalchanges(tempConfig);
|
|
267
|
-
|
|
268
265
|
if (Object.keys(config).length > 0) {
|
|
269
266
|
if (!config.doNotUseDefaultFieldConfig && !tempConfigCreated) {
|
|
270
267
|
if (config.useAccessibleConfig) {
|
|
@@ -288,7 +285,7 @@ export default async function(config) {
|
|
|
288
285
|
if (!fs.existsSync(`${defaultSettings.srcFolder}/${defaultSettings.tmpFolder}`)) {
|
|
289
286
|
fs.mkdirSync(`${defaultSettings.srcFolder}/${defaultSettings.tmpFolder}`, { recursive: true });
|
|
290
287
|
}
|
|
291
|
-
|
|
288
|
+
Object.assign(config, tempConfig);
|
|
292
289
|
fs.writeFileSync(`${defaultSettings.srcFolder}/${defaultSettings.tmpFolder}/config.json`, JSON.stringify(tempConfig, null, 2));
|
|
293
290
|
}
|
|
294
291
|
}
|