mod-build 3.6.71 → 4.0.0-alpha.1
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/.eslintignore +3 -0
- package/.eslintrc +18 -0
- package/CHANGELOG.md +2 -240
- package/README.md +16 -263
- package/gulp-tasks/build.js +1 -1
- package/package.json +21 -69
- package/siteconfig.js +38 -0
- package/src/accessible-components/button/_button.scss +195 -0
- package/src/accessible-components/button/back-button.html +4 -0
- package/src/accessible-components/button/button.html +17 -0
- package/src/accessible-components/carousel/_carousel.scss +112 -0
- package/src/accessible-components/carousel/carousel.html +25 -0
- package/src/accessible-components/checkbox/_checkbox.scss +96 -0
- package/src/accessible-components/checkbox/checkbox.html +8 -0
- package/src/accessible-components/expand-collapse/_expand-collapse.scss +122 -0
- package/src/accessible-components/expand-collapse/expand-collapse.html +8 -0
- package/src/accessible-components/expand-collapse/expand-collapse.js +52 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js +2 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js.map +1 -0
- package/src/accessible-components/featured-block/_featured-block.scss +219 -0
- package/src/accessible-components/featured-block/featured-block.html +54 -0
- package/src/accessible-components/foot-assets/foot-assets.html +92 -0
- package/src/accessible-components/footer/footer.html +2 -0
- package/src/{templates/_partials/scripts/gtm-editorials/body/google-tag-manager-body.html → accessible-components/gtm-body/gtm-body.html} +1 -2
- package/src/accessible-components/head/head.html +188 -0
- package/src/accessible-components/header/_header.scss +289 -0
- package/src/accessible-components/header/header.html +66 -0
- package/src/accessible-components/hero/_hero.scss +371 -0
- package/src/accessible-components/hero/hero.html +53 -0
- package/src/accessible-components/how-it-works/_how-it-works.scss +217 -0
- package/src/accessible-components/how-it-works/how-it-works-carousel.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works-static.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works.html +14 -0
- package/src/accessible-components/information/_information.scss +92 -0
- package/src/accessible-components/information/information.html +26 -0
- package/src/accessible-components/input/_input.scss +202 -0
- package/src/accessible-components/input/input.html +22 -0
- package/src/accessible-components/input/textarea.html +9 -0
- package/src/accessible-components/partners/_partners.scss +232 -0
- package/src/accessible-components/partners/partners.html +56 -0
- package/src/accessible-components/picture/picture.html +19 -0
- package/src/accessible-components/preloader/_preloader.scss +61 -0
- package/src/accessible-components/preloader/preloader.html +23 -0
- package/src/accessible-components/progress-bar/_progress-bar.scss +119 -0
- package/src/accessible-components/progress-bar/progress-bar.html +21 -0
- package/src/accessible-components/progress-bar/progress-bar.js +37 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js +2 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js.map +1 -0
- package/src/accessible-components/radio-button/_radio-button.scss +537 -0
- package/src/accessible-components/radio-button/radio-button.html +34 -0
- package/src/accessible-components/reviews/_reviews.scss +175 -0
- package/src/accessible-components/reviews/reviews-carousel.html +12 -0
- package/src/accessible-components/reviews/reviews-static.html +12 -0
- package/src/accessible-components/reviews/reviews.html +37 -0
- package/src/accessible-components/select/_select.scss +69 -0
- package/src/accessible-components/select/select.html +10 -0
- package/src/accessible-components/steps/_steps.scss +524 -0
- package/src/accessible-components/steps/defaultFormFieldConfig.json +109 -0
- package/src/accessible-components/steps/step-fields.html +33 -0
- package/src/accessible-components/steps/steps.html +150 -0
- package/src/accessible-components/tcpa/_tcpa.scss +49 -0
- package/src/accessible-components/tcpa/tcpa.html +9 -0
- package/src/accessible-components/tile/_tile.scss +117 -0
- package/src/accessible-components/tile/tile.html +14 -0
- package/src/accessible-components/value-props/_value-props.scss +100 -0
- package/src/accessible-components/value-props/value-props.html +17 -0
- package/src/accessible-components/zip-control/_zip-control.scss +78 -0
- package/src/accessible-components/zip-control/zip-control.html +10 -0
- package/src/data/footer.js +117 -0
- package/src/data/seasons.js +5 -7
- package/src/data/theme.json +164 -0
- package/src/index.html +18 -0
- package/src/main.js +45 -0
- package/src/resources/scripts/abandonment/abandonment-1df90ee155f6c0893d90.min.js +2 -0
- package/src/resources/scripts/abandonment/abandonment.min.js +2 -0
- package/src/resources/scripts/footer/footer-component-7b5e263f64568573ecc0.min.js +2 -0
- package/src/resources/scripts/footer/footer-component.min.js +2 -0
- package/src/resources/scripts/helpers/initNumericOnlyFields.min.js +2 -0
- package/src/resources/scripts/helpers/initNumericOnlyFields.min.js.map +1 -0
- package/src/resources/scripts/helpers/isZipCodeValid.min.js +2 -0
- package/src/resources/scripts/helpers/isZipCodeValid.min.js.map +1 -0
- package/src/resources/scripts/mod-alytics/modalytics-0ac7d7a5a72ea67a0f47.min.js +2 -0
- package/src/resources/scripts/mod-alytics/modalytics.min.js +2 -0
- package/src/resources/scripts/mod-form/form/homeowner-77a4dd439b8db412678b.min.js +2 -0
- package/src/resources/scripts/mod-form/form/homeowner.min.js +2 -0
- package/src/resources/scripts/mod-utils/modutils-8ba40d21f559171ddd36.min.js +2 -0
- package/src/resources/scripts/mod-utils/modutils.min.js +2 -0
- package/src/resources/styles/components/abandonment/abandonment-ae63aca828944411eff7.min.css +1 -0
- package/src/resources/styles/components/abandonment/abandonment.min.css +1 -0
- package/src/resources/styles/components/footer/mod-footer-3717faf57147c62c1777.min.css +1 -0
- package/src/resources/styles/components/footer/mod-footer.min.css +1 -0
- package/src/resources/styles/components/footer/qs-footer-12bf078dc614ff221c3c.min.css +1 -0
- package/src/resources/styles/components/footer/qs-footer.min.css +1 -0
- package/src/resources/templates/modals/about/index.html +9 -0
- package/src/resources/templates/modals/contact-us/index.html +348 -0
- package/src/resources/templates/modals/faq/index.html +9 -0
- package/src/resources/templates/modals/privacy/index.html +236 -0
- package/src/resources/templates/modals/terms/index.html +166 -0
- package/src/scripts/has-qs-params.js +6 -5
- package/src/scripts/url-cleaner.js +3 -3
- package/src/scripts/utils.js +178 -0
- package/src/styles/home.scss +1 -0
- package/src/temp/scripts/maxmind-geoip2.js +104 -0
- package/src/templates/_partials/scripts/deferred-styles.html +16 -16
- package/src/templates/_partials/scripts/vwo-redirect-callback.html +43 -45
- package/src/templates/components/head.html +70 -0
- package/tasks/clean.js +13 -0
- package/tasks/grab-cdn.js +107 -0
- package/tasks/grab-form-helpers.js +94 -0
- package/tasks/grab-shared-components.js +81 -0
- package/tasks/grab-shared-scripts.js +267 -0
- package/tasks/serve.js +15 -0
- package/tasks/templates.js +168 -0
- package/template.js +801 -0
- package/vite.config.js +56 -0
- package/.eslintrc.yml +0 -59
- package/src/data/common.js +0 -704
- package/src/data/components/qs-footer.js +0 -55
- package/src/data/components/quote-footer.js +0 -73
- package/src/scripts/apt-block.js +0 -919
- package/src/scripts/components/custom-selects.js +0 -48
- package/src/scripts/components/radio-panels.js +0 -45
- package/src/scripts/es6-1.js +0 -6
- package/src/scripts/es6-2.js +0 -2
- package/src/scripts/qs-form.js +0 -839
- package/src/scripts/vendor/maxmind-geoip2.js +0 -2
- package/src/scripts/vendor/swiper.min.js +0 -13
- package/src/styles/apt-block.scss +0 -888
- package/src/templates/_partials/apt-block.html +0 -30
- package/src/templates/_partials/scripts/analytics.html +0 -4
- package/src/templates/_partials/scripts/go-page-hiding-snippet.html +0 -8
- package/src/templates/_partials/scripts/google-maps.html +0 -1
- package/src/templates/_partials/scripts/google-optimize.html +0 -12
- package/src/templates/_partials/scripts/gtm-editorials/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-hil/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-hil/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-pro/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-pro/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-quote/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-quote/head/google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/gtm-whitelabel/body/mod-google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-whitelabel/body/non-mod-google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-whitelabel/head/mod-google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-whitelabel/head/non-mod-google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/gtm-wordpress/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-wordpress/head/google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/visual-website-optimizer.html +0 -5
- package/src/templates/index.html +0 -46
- /package/{src → public}/favicon.ico +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defaultSettings } from '../siteconfig.js'
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { createWriteStream } from 'node:fs';
|
|
4
|
+
import * as stream from 'node:stream';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
|
|
8
|
+
const resourcePath = 'quote/resources/mod-form/form';
|
|
9
|
+
|
|
10
|
+
// helper to allow us to define an "end" event to multiple streams
|
|
11
|
+
const streamToDestination = (destPath, fileName) => {
|
|
12
|
+
if (!fileName) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const finished = promisify(stream.finished);
|
|
17
|
+
const url = `https://${defaultSettings.resourceDomain}/${resourcePath}/${fileName}`;
|
|
18
|
+
|
|
19
|
+
return new Promise(resolve => {
|
|
20
|
+
const folderPath = `${defaultSettings.srcFolder}/${destPath}`;
|
|
21
|
+
|
|
22
|
+
if (!fs.existsSync(folderPath)) {
|
|
23
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// if file exists, do not create it again
|
|
27
|
+
if (fs.existsSync(`${folderPath}/${fileName}`)) {
|
|
28
|
+
resolve();
|
|
29
|
+
} else {
|
|
30
|
+
const writer = createWriteStream(`${folderPath}/${fileName}`)
|
|
31
|
+
const options = {
|
|
32
|
+
url,
|
|
33
|
+
method: 'get',
|
|
34
|
+
responseType: 'stream'
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
axios(options).then(resp => {
|
|
38
|
+
if (resp.status !== 200) {
|
|
39
|
+
throw new Error(`${resp.status}: Error while fetching ${url}`);
|
|
40
|
+
}
|
|
41
|
+
resp.data.pipe(writer);
|
|
42
|
+
console.log(`${destPath}/${fileName} created...`);
|
|
43
|
+
return finished(writer);
|
|
44
|
+
}).then(() => {
|
|
45
|
+
resolve();
|
|
46
|
+
}).catch(error => {
|
|
47
|
+
console.error(error);
|
|
48
|
+
resolve();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function getHelpers() {
|
|
55
|
+
let helpers = [];
|
|
56
|
+
await new Promise(resolve => {
|
|
57
|
+
const options = {
|
|
58
|
+
url: `https://${defaultSettings.resourceDomain}/${resourcePath}/chunks.txt`,
|
|
59
|
+
method: 'get'
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
axios(options).then(resp => {
|
|
63
|
+
if (resp.status !== 200) {
|
|
64
|
+
throw new Error(`${resp.status}: Error while fetching ${url}`);
|
|
65
|
+
}
|
|
66
|
+
helpers = resp.data.split('\n');
|
|
67
|
+
resolve();
|
|
68
|
+
}).then(() => {
|
|
69
|
+
resolve();
|
|
70
|
+
}).catch(error => {
|
|
71
|
+
console.error(error);
|
|
72
|
+
resolve();
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return helpers;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default async function(done) {
|
|
80
|
+
const { nodeEnv } = defaultSettings;
|
|
81
|
+
const helpers = await getHelpers(defaultSettings);
|
|
82
|
+
|
|
83
|
+
if (!nodeEnv) {
|
|
84
|
+
throw new Error('Missing environment variables. Did you start with gulp instead of npm run...?');
|
|
85
|
+
}
|
|
86
|
+
const destinationPath = '/resources/scripts/helpers/';
|
|
87
|
+
const filesPromiseMap = helpers.map(async helper => {
|
|
88
|
+
const fileName = helper;
|
|
89
|
+
await streamToDestination(destinationPath, fileName);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
await Promise.all(filesPromiseMap);
|
|
93
|
+
done();
|
|
94
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defaultSettings, siteData } from '../siteconfig.js'
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { createWriteStream } from 'node:fs';
|
|
4
|
+
import * as stream from 'node:stream';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
|
|
8
|
+
const resourcePath = 'quote/resources/mod-site';
|
|
9
|
+
const componentFolders = ['accessible-components'];
|
|
10
|
+
|
|
11
|
+
const streamSharedCompsToDestination = (defaultSettings, folder, fileName) => {
|
|
12
|
+
const finished = promisify(stream.finished);
|
|
13
|
+
|
|
14
|
+
return new Promise(resolve => {
|
|
15
|
+
const folderPath = `${defaultSettings.srcFolder}/${folder}`;
|
|
16
|
+
const componentFolderPath = fileName.split('/')[0];
|
|
17
|
+
|
|
18
|
+
if (!fs.existsSync(folderPath)) {
|
|
19
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (!fs.existsSync(`${folderPath}/${componentFolderPath}`)) {
|
|
23
|
+
fs.mkdirSync(`${folderPath}/${componentFolderPath}`, { recursive: true });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// if file exists, do not create it again
|
|
27
|
+
if (fs.existsSync(`${folderPath}/${fileName}`)) {
|
|
28
|
+
resolve();
|
|
29
|
+
} else {
|
|
30
|
+
const writer = createWriteStream(`${folderPath}/${fileName}`)
|
|
31
|
+
const options = {
|
|
32
|
+
url: `https://${defaultSettings.resourceDomain}/${resourcePath}/${folder}/${fileName}`,
|
|
33
|
+
method: 'get',
|
|
34
|
+
responseType: 'stream'
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
axios(options).then(resp => {
|
|
38
|
+
if (resp.status !== 200) {
|
|
39
|
+
throw new Error(`${resp.status}: Error while fetching ${url}`);
|
|
40
|
+
}
|
|
41
|
+
console.log(`${folderPath}/${fileName} created...`);
|
|
42
|
+
resp.data.pipe(writer);
|
|
43
|
+
return finished(writer);
|
|
44
|
+
}).then(() => {
|
|
45
|
+
resolve();
|
|
46
|
+
}).catch(error => {
|
|
47
|
+
console.error(error);
|
|
48
|
+
resolve();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const getListOfSharedComponents = (defaultSettings, componentFolders) => {
|
|
55
|
+
return componentFolders.map(folder => {
|
|
56
|
+
return new Promise(resolve => {
|
|
57
|
+
axios.get(`https://${defaultSettings.resourceDomain}/${resourcePath}/${folder}/all.json`)
|
|
58
|
+
.then(resp => {
|
|
59
|
+
if (resp.status !== 200) {
|
|
60
|
+
throw new Error(`${resp.status}: Error while fetching ${folder}/all.json`);
|
|
61
|
+
}
|
|
62
|
+
const listOfComponents = resp.data;
|
|
63
|
+
const componentPromises = listOfComponents.map(resource => {
|
|
64
|
+
return streamSharedCompsToDestination(defaultSettings, folder, `${resource}`);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
resolve(Promise.all(componentPromises));
|
|
68
|
+
})
|
|
69
|
+
.catch(err => {
|
|
70
|
+
console.log(defaultSettings.nodeEnv);
|
|
71
|
+
throw new Error(`Error while fetching ${folder}/all.json: ${err.message}`);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default function(done) {
|
|
78
|
+
console.log('running grab-shared-components');
|
|
79
|
+
getListOfSharedComponents(defaultSettings, componentFolders);
|
|
80
|
+
done();
|
|
81
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { defaultSettings, siteData } from '../siteconfig.js'
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { createWriteStream } from 'node:fs';
|
|
4
|
+
import * as stream from 'node:stream';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import gulp from 'gulp';
|
|
8
|
+
import tap from 'gulp-tap';
|
|
9
|
+
import hash from 'gulp-hash';
|
|
10
|
+
import replace from 'gulp-replace';
|
|
11
|
+
import { getFileFromURL } from '../src/scripts/utils.js';
|
|
12
|
+
|
|
13
|
+
let fileNames = {
|
|
14
|
+
modAlyticsFileName: '',
|
|
15
|
+
modUtilsFileName: '',
|
|
16
|
+
abandonmentJsFileName: '',
|
|
17
|
+
footerComponentJsFileName: '',
|
|
18
|
+
modFooterStylesFileName: '',
|
|
19
|
+
qsFooterStylesFileName: '',
|
|
20
|
+
homeownerFormFileName: ''
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
let isQuotePageOrUseRelativePath = false;
|
|
24
|
+
let resourceURL = '';
|
|
25
|
+
let pathSubdirectory = '';
|
|
26
|
+
let componentFolderPath = '';
|
|
27
|
+
|
|
28
|
+
function replaceModalyticsSrc(gulp, defaultSettings) {
|
|
29
|
+
const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/` : '/resources/scripts/mod-alytics/';
|
|
30
|
+
return gulp.src(`${defaultSettings.srcFolder}/${componentFolderPath}/head/head.html`)
|
|
31
|
+
.pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
|
|
32
|
+
.pipe(gulp.dest(`${defaultSettings.srcFolder}/${componentFolderPath}/head`));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function replaceFootAssetScripts(gulp, defaultSettings) {
|
|
36
|
+
const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts` : '/resources/scripts';
|
|
37
|
+
return gulp.src(`${defaultSettings.srcFolder}/${componentFolderPath}/foot-assets/foot-assets.html`)
|
|
38
|
+
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"|"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/form.*?)js"/g, function(match) {
|
|
39
|
+
if (match.includes('mod-form/form')) {
|
|
40
|
+
return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
|
|
41
|
+
} else if (match.includes('modutils') || match.includes('mod-utils')) {
|
|
42
|
+
return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
|
|
43
|
+
} else if (match.includes('footer-component')) {
|
|
44
|
+
return `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`;
|
|
45
|
+
}
|
|
46
|
+
}))
|
|
47
|
+
.pipe(gulp.dest(`${defaultSettings.srcFolder}/${componentFolderPath}/foot-assets`))
|
|
48
|
+
.on('end', function() {
|
|
49
|
+
console.log('>> FINISHED replacing foot asset scripts');
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function replaceAbandonmentJsCssSrc(gulp, defaultSettings) {
|
|
54
|
+
const jsResourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}resources/scripts/abandonment/` : '/resources/scripts/abandonment/';
|
|
55
|
+
const cssResourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}resources/styles/components/abandonment/` : '/resources/styles/components/abandonment/';
|
|
56
|
+
return gulp.src(defaultSettings.srcFolder + '/templates/abandonment/*.html')
|
|
57
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(abandonment\/abandonment.*?)js"/, `"${jsResourcePath}${fileNames.abandonmentJsFileName}"`))
|
|
58
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(components\/abandonment\/abandonment.*?)css"/, `"${cssResourcePath}${fileNames.abandonmentStylesFileName}"`))
|
|
59
|
+
.pipe(gulp.dest(defaultSettings.srcFolder + '/templates/abandonment'));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function replaceFooterStylesReference(gulp, defaultSettings, siteData) {
|
|
63
|
+
if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
|
|
64
|
+
return gulp.src(defaultSettings.srcFolder + '/resources/scripts/footer/' + fileNames.footerComponentJsFileName)
|
|
65
|
+
.pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/mod.*?)\)/, `concat("${pathSubdirectory}resources/styles/components/footer/` + fileNames.modFooterStylesFileName + '")'))
|
|
66
|
+
.pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/qs.*?)\)/, `concat("${pathSubdirectory}resources/styles/components/footer/` + fileNames.qsFooterStylesFileName + '")'))
|
|
67
|
+
.pipe(gulp.dest(defaultSettings.srcFolder + '/resources/scripts/footer'))
|
|
68
|
+
} else if (!siteData.siteData || siteData.siteData && !siteData.siteData.isQuotePage) {
|
|
69
|
+
return gulp.src(defaultSettings.srcFolder + '/resources/scripts/footer/' + fileNames.footerComponentJsFileName)
|
|
70
|
+
.pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/mod.*?)\)/, 'concat("/resources/styles/components/footer/' + fileNames.modFooterStylesFileName + '")'))
|
|
71
|
+
.pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/qs.*?)\)/, 'concat("/resources/styles/components/footer/' + fileNames.qsFooterStylesFileName + '")'))
|
|
72
|
+
.pipe(gulp.dest(defaultSettings.srcFolder + '/resources/scripts/footer'))
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function replaceFooterStylesReferenceInMap(gulp, defaultSettings, siteData) {
|
|
77
|
+
if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
|
|
78
|
+
return gulp.src(defaultSettings.srcFolder + '/resources/scripts/footer/footer-component.min.js.map')
|
|
79
|
+
.pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`' + pathSubdirectory + 'resources/styles/components/footer/' + fileNames.modFooterStylesFileName + '`'))
|
|
80
|
+
.pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`' + pathSubdirectory + 'resources/styles/components/footer/' + fileNames.qsFooterStylesFileName + '`'))
|
|
81
|
+
.pipe(gulp.dest(defaultSettings.srcFolder + '/resources/scripts/footer'));
|
|
82
|
+
} else if (!siteData.siteData || siteData.siteData && !siteData.siteData.isQuotePage) {
|
|
83
|
+
return gulp.src(defaultSettings.srcFolder + '/resources/scripts/footer/footer-component.min.js.map')
|
|
84
|
+
.pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`/resources/styles/components/footer/' + fileNames.modFooterStylesFileName + '`'))
|
|
85
|
+
.pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`/resources/styles/components/footer/' + fileNames.qsFooterStylesFileName + '`'))
|
|
86
|
+
.pipe(gulp.dest(defaultSettings.srcFolder + '/resources/scripts/footer'));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const TASKS = {
|
|
91
|
+
copyModutils: {
|
|
92
|
+
url: 'mod-utils/modutils.min.js',
|
|
93
|
+
config: {
|
|
94
|
+
fileName: 'modUtilsFileName',
|
|
95
|
+
dest: 'scripts/mod-utils',
|
|
96
|
+
mapUrl: 'mod-utils/modutils.min.js.map'
|
|
97
|
+
},
|
|
98
|
+
srcReplaceFn: null,
|
|
99
|
+
additionalSrcReplaceFns: []
|
|
100
|
+
},
|
|
101
|
+
copyFooterComponentJs: {
|
|
102
|
+
url: 'shared-resources/scripts/footer/footer-component.min.js',
|
|
103
|
+
config: {
|
|
104
|
+
fileName: 'footerComponentJsFileName',
|
|
105
|
+
dest: 'scripts/footer',
|
|
106
|
+
mapUrl: 'shared-resources/scripts/footer/footer-component.min.js.map'
|
|
107
|
+
},
|
|
108
|
+
srcReplaceFn: null,
|
|
109
|
+
additionalSrcReplaceFns: []
|
|
110
|
+
},
|
|
111
|
+
copyHomeownerForm: {
|
|
112
|
+
url: 'mod-form/form/homeowner.min.js',
|
|
113
|
+
config: {
|
|
114
|
+
fileName: 'homeownerFormFileName',
|
|
115
|
+
dest: 'scripts/mod-form/form',
|
|
116
|
+
mapUrl: 'mod-form/form/homeowner.min.js.map'
|
|
117
|
+
},
|
|
118
|
+
srcReplaceFn: replaceFootAssetScripts,
|
|
119
|
+
additionalSrcReplaceFns: []
|
|
120
|
+
},
|
|
121
|
+
copyModalytics: {
|
|
122
|
+
url: 'mod-alytics/modalytics.min.js',
|
|
123
|
+
config: {
|
|
124
|
+
fileName: 'modAlyticsFileName',
|
|
125
|
+
dest: 'scripts/mod-alytics',
|
|
126
|
+
mapUrl: 'mod-alytics/modalytics.min.js.map'
|
|
127
|
+
},
|
|
128
|
+
srcReplaceFn: replaceModalyticsSrc,
|
|
129
|
+
additionalSrcReplaceFns: []
|
|
130
|
+
},
|
|
131
|
+
copyAbandonmentComponentStyles: {
|
|
132
|
+
url: 'shared-resources/styles/components/abandonment/abandonment.min.css',
|
|
133
|
+
config: {
|
|
134
|
+
fileName: 'abandonmentStylesFileName',
|
|
135
|
+
dest: 'styles/components/abandonment',
|
|
136
|
+
mapUrl: null
|
|
137
|
+
},
|
|
138
|
+
srcReplaceFn: null,
|
|
139
|
+
additionalSrcReplaceFns: []
|
|
140
|
+
},
|
|
141
|
+
copyAbandonmentJs: {
|
|
142
|
+
url: 'shared-resources/scripts/abandonment/abandonment.min.js',
|
|
143
|
+
config: {
|
|
144
|
+
fileName: 'abandonmentJsFileName',
|
|
145
|
+
dest: 'scripts/abandonment',
|
|
146
|
+
mapUrl: 'shared-resources/scripts/abandonment/abandonment.min.js.map'
|
|
147
|
+
},
|
|
148
|
+
srcReplaceFn: replaceAbandonmentJsCssSrc,
|
|
149
|
+
additionalSrcReplaceFns: []
|
|
150
|
+
},
|
|
151
|
+
copyModFooterComponentStyles: {
|
|
152
|
+
url: 'shared-resources/styles/components/footer/mod-footer.min.css',
|
|
153
|
+
config: {
|
|
154
|
+
fileName: 'modFooterStylesFileName',
|
|
155
|
+
dest: 'styles/components/footer',
|
|
156
|
+
mapUrl: null
|
|
157
|
+
},
|
|
158
|
+
srcReplaceFn: null,
|
|
159
|
+
additionalSrcReplaceFns: []
|
|
160
|
+
},
|
|
161
|
+
copyQsFooterComponentStyles: {
|
|
162
|
+
url: 'shared-resources/styles/components/footer/qs-footer.min.css',
|
|
163
|
+
config: {
|
|
164
|
+
fileName: 'qsFooterStylesFileName',
|
|
165
|
+
dest: 'styles/components/footer',
|
|
166
|
+
mapUrl: null
|
|
167
|
+
},
|
|
168
|
+
srcReplaceFn: null,
|
|
169
|
+
additionalSrcReplaceFns: [replaceFooterStylesReference, replaceFooterStylesReferenceInMap]
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
function getResource(task, fileNames, resourcePath = 'quote/resources') {
|
|
174
|
+
const { url, config, srcReplaceFn, additionalSrcReplaceFns } = task;
|
|
175
|
+
|
|
176
|
+
if (Object.keys(config).length === 0) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const finished = promisify(stream.finished);
|
|
181
|
+
|
|
182
|
+
return new Promise(resolve => {
|
|
183
|
+
const file = getFileFromURL(url);
|
|
184
|
+
|
|
185
|
+
if (!fs.existsSync(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}`)) {
|
|
186
|
+
fs.mkdirSync(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}`, { recursive: true });
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// if file exists, do not create it again
|
|
190
|
+
if (fs.existsSync(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}/${file}`)) {
|
|
191
|
+
resolve();
|
|
192
|
+
} else {
|
|
193
|
+
const options = {
|
|
194
|
+
url: `https://${task.config.defaultSettings.resourceDomain}/${resourcePath}/${url}`,
|
|
195
|
+
method: 'get',
|
|
196
|
+
responseType: 'stream'
|
|
197
|
+
}
|
|
198
|
+
axios(options).then(resp => {
|
|
199
|
+
if (resp.status !== 200) {
|
|
200
|
+
throw new Error(`${resp.status}: Error while fetching ${url}`);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
const writer = createWriteStream(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}/${file}`);
|
|
204
|
+
resp.data.pipe(writer);
|
|
205
|
+
console.log(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}/${file} created...`);
|
|
206
|
+
return finished(writer);
|
|
207
|
+
})
|
|
208
|
+
.then(() => {
|
|
209
|
+
gulp.src(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}/${file}`)
|
|
210
|
+
.pipe(hash({
|
|
211
|
+
hashLength: 20,
|
|
212
|
+
algorithm: 'md5',
|
|
213
|
+
template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
|
|
214
|
+
}))
|
|
215
|
+
.pipe(tap(function(file, t) {
|
|
216
|
+
file = JSON.stringify(file);
|
|
217
|
+
file = JSON.parse(file).history[1];
|
|
218
|
+
fileNames[task.config.fileName] = file.split('/').pop();
|
|
219
|
+
}))
|
|
220
|
+
.pipe(gulp.dest(`${task.config.defaultSettings.srcFolder}/resources/${config.dest}`));
|
|
221
|
+
resolve();
|
|
222
|
+
})
|
|
223
|
+
.then(() => {
|
|
224
|
+
if (!config.mapUrl) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
// do we really need to separately get sourcemaps??
|
|
228
|
+
resolve();
|
|
229
|
+
})
|
|
230
|
+
.then(() => {
|
|
231
|
+
if (!srcReplaceFn) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
// we should update the mod/qs footer components to inject their own CSS instead of hardcoding the file path & then renaming it here!
|
|
235
|
+
resolve();
|
|
236
|
+
})
|
|
237
|
+
}
|
|
238
|
+
})
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export default async function(done) {
|
|
242
|
+
const { isLocal } = defaultSettings;
|
|
243
|
+
const isQuotePage = siteData?.siteData?.isQuotePage || siteData?.isQuotePage;
|
|
244
|
+
const useAccessibleComponents = siteData?.siteData?.useAccessibleConfig || siteData?.useAccessibleConfig;
|
|
245
|
+
const useRelativePathForResources = siteData?.siteData?.useRelativePathForResources || siteData?.useRelativePathForResources;
|
|
246
|
+
componentFolderPath = useAccessibleComponents === true ? 'accessible-components' : 'shared-components';
|
|
247
|
+
isQuotePageOrUseRelativePath = isQuotePage === true || useRelativePathForResources === true;
|
|
248
|
+
const isPathSubdirectory = siteData?.siteData?.pathSubdirectory || siteData?.pathSubdirectory;
|
|
249
|
+
pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
|
|
250
|
+
|
|
251
|
+
const tasks = Object.values(TASKS);
|
|
252
|
+
if (tasks.length) {
|
|
253
|
+
const getAllResources = tasks.map(async function(task) {
|
|
254
|
+
if (useAccessibleComponents === true) {
|
|
255
|
+
if (task.url.includes('abandonment.min.js')) {
|
|
256
|
+
task.url = 'shared-resources/scripts/abandonment/accessible/abandonment.min.js';
|
|
257
|
+
task.config.mapUrl = 'shared-resources/scripts/abandonment/accessible/abandonment.min.js.map';
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
Object.assign(task.config, { defaultSettings, siteData });
|
|
261
|
+
await getResource(task, fileNames);
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
await Promise.all(getAllResources);
|
|
265
|
+
done();
|
|
266
|
+
}
|
|
267
|
+
}
|
package/tasks/serve.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import { task } from 'gulp';
|
|
2
|
+
import gulp from 'gulp';
|
|
3
|
+
import grabSharedComponents from './grab-shared-components.js';
|
|
4
|
+
import grabSharedScripts from './grab-shared-scripts.js';
|
|
5
|
+
import clean from './clean.js';
|
|
6
|
+
import grabCdn from './grab-cdn.js';
|
|
7
|
+
import grabFormHelpers from './grab-form-helpers.js';
|
|
8
|
+
import templates from './templates.js';
|
|
9
|
+
|
|
10
|
+
export function done() {
|
|
11
|
+
console.log('done');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Define a gulp task to test if gulp is running correctly
|
|
15
|
+
export default gulp.series(clean, grabCdn, grabSharedComponents, grabSharedScripts, grabFormHelpers, templates, done);
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { defaultSettings, siteData, setSiteData } from '../siteconfig.js'
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import footer from '../src/data/footer.js';
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import { getActiveSeasons, handlebarsHelpers } from '../src/scripts/utils.js';
|
|
6
|
+
import gulpHandlebarsFileInclude from 'gulp-handlebars-file-include';
|
|
7
|
+
import gulp from 'gulp';
|
|
8
|
+
|
|
9
|
+
const { isLocal, resourceDomain, buildPath } = defaultSettings;
|
|
10
|
+
const { isWhiteLabel } = siteData;
|
|
11
|
+
const assetsPath = isWhiteLabel ? '' : (isLocal ? '/temp/assets' : `https://${resourceDomain}/quote/resources/assets`);
|
|
12
|
+
|
|
13
|
+
const activeSeason = getActiveSeasons();
|
|
14
|
+
|
|
15
|
+
if (activeSeason.length) {
|
|
16
|
+
if (siteData.seasonalVariations) {
|
|
17
|
+
activeSeason.forEach(season => {
|
|
18
|
+
if (season in siteData.seasonalVariations) {
|
|
19
|
+
setSiteData({ ...siteData, ...siteData.seasonalVariations[season] });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const templatesData = {
|
|
26
|
+
...siteData,
|
|
27
|
+
...footer(siteData),
|
|
28
|
+
...{ isLocal, resourceDomain, assetsPath, buildPath },
|
|
29
|
+
steps: {
|
|
30
|
+
items: [
|
|
31
|
+
{
|
|
32
|
+
stepContent: {
|
|
33
|
+
fields: []
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function mergeDefaultFormFieldConfig(steps, defaultConfig) {
|
|
41
|
+
if (!steps.items) {
|
|
42
|
+
console.error('No items[ ] found in steps{}!');
|
|
43
|
+
return steps;
|
|
44
|
+
}
|
|
45
|
+
if (templatesData.siteData?.useAccessibleConfig) {
|
|
46
|
+
steps.items.forEach(item => {
|
|
47
|
+
if (item.stepContent?.fields) {
|
|
48
|
+
item.stepContent.fields = item.stepContent.fields.map(field => {
|
|
49
|
+
if (field.attributes && field.attributes.name && defaultConfig[field.attributes.name]) {
|
|
50
|
+
field = { ...defaultConfig[field.attributes.name], ...field };
|
|
51
|
+
}
|
|
52
|
+
return field;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
steps.items.forEach(item => {
|
|
58
|
+
if (item.fields) {
|
|
59
|
+
item.fields = item.fields.map(field => {
|
|
60
|
+
if (field.name && defaultConfig[field.name]) {
|
|
61
|
+
field = Object.assign({}, defaultConfig[field.name], field);
|
|
62
|
+
}
|
|
63
|
+
return field;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return steps;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const getDefaultFormFieldConfig = async (folder = 'accessible-components') => {
|
|
73
|
+
console.time('Finished fetch-default-form-config after');
|
|
74
|
+
console.log('Starting fetch-default-form-config: ');
|
|
75
|
+
|
|
76
|
+
if (!templatesData.defaultConfigCompleted) {
|
|
77
|
+
await new Promise((resolve) => {
|
|
78
|
+
axios.get(`https://${defaultSettings.nodeEnv}/quote/resources/mod-site/${folder}/steps/defaultFormFieldConfig.json`)
|
|
79
|
+
.then(async resp => {
|
|
80
|
+
if (resp.status !== 200) {
|
|
81
|
+
throw new Error(`${resp.status}: Error while fetching ${folder}/defaultFormFieldConfig.json`);
|
|
82
|
+
}
|
|
83
|
+
const defaultConfig = resp.data;
|
|
84
|
+
if (templatesData.steps) {
|
|
85
|
+
templatesData.steps = await mergeDefaultFormFieldConfig(templatesData.steps, defaultConfig);
|
|
86
|
+
}
|
|
87
|
+
if (templatesData.qsSteps) {
|
|
88
|
+
templatesData.qsSteps = await mergeDefaultFormFieldConfig(templatesData.qsSteps, defaultConfig);
|
|
89
|
+
}
|
|
90
|
+
if (templatesData.modSteps) {
|
|
91
|
+
templatesData.modSteps = await mergeDefaultFormFieldConfig(templatesData.modSteps, defaultConfig);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
templatesData.defaultConfigCompleted = true;
|
|
95
|
+
console.log(templatesData.defaultConfigCompleted);
|
|
96
|
+
resolve();
|
|
97
|
+
}).catch(error => {
|
|
98
|
+
console.error(error);
|
|
99
|
+
resolve();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
console.timeEnd('Finished fetch-default-form-config after');
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const fetchTcpaFromSitegenie = async () => {
|
|
107
|
+
const company = templatesData.company_name;
|
|
108
|
+
const website = templatesData.website_name;
|
|
109
|
+
const c_level = templatesData.cLevel || 'default';
|
|
110
|
+
const affiliateKey = templatesData.affiliateKey || 0;
|
|
111
|
+
const service = templatesData.service ? templatesData.service.toLowerCase().replace(' ', '_') : templatesData.primary_trade.toLowerCase().replace(' ', '_');
|
|
112
|
+
const apiEnv = 'https://' + (templatesData.resourceDomain === 'modernize.com' ? 'hs.leadpost.net/' : 'hsleadpost1.quinstage.com/');
|
|
113
|
+
|
|
114
|
+
const url = `${apiEnv}coreg/getTCPAConsent?website=${website}&service=${service}&affiliateKey=${affiliateKey}&c_level=${c_level}`;
|
|
115
|
+
|
|
116
|
+
console.time('Finished fetch-tcpa-from-sitegenie after');
|
|
117
|
+
console.log('Starting fetch-tcpa-from-sitegenie: ',url);
|
|
118
|
+
|
|
119
|
+
await new Promise(function(resolve) {
|
|
120
|
+
axios.get(url).then(async resp => {
|
|
121
|
+
if (resp.status !== 200) {
|
|
122
|
+
throw new Error(`${resp.status}: Error while fetching TCPA`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const responseJson = resp.data;
|
|
126
|
+
let finalTCPA = await (company === 'Modernize' || templatesData.useModernizeInTCPA) ? responseJson.tcpa.replace(/QuinStreet/g, 'Modernize') : responseJson.tcpa;
|
|
127
|
+
const removeInlineStyleRegex = / style="[^"]*"/g;
|
|
128
|
+
finalTCPA = finalTCPA.replace(removeInlineStyleRegex, '');
|
|
129
|
+
templatesData.tcpaText = await finalTCPA;
|
|
130
|
+
resolve();
|
|
131
|
+
}).catch(error => {
|
|
132
|
+
console.error(error);
|
|
133
|
+
resolve();
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
console.timeEnd('Finished fetch-tcpa-from-sitegenie after');
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export default async function(done) {
|
|
140
|
+
if (Object.keys(siteData).length > 0) {
|
|
141
|
+
if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
|
|
142
|
+
if (siteData.useAccessibleConfig) {
|
|
143
|
+
await getDefaultFormFieldConfig('accessible-components');
|
|
144
|
+
} else {
|
|
145
|
+
await getDefaultFormFieldConfig('shared-components');
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (!templatesData.tcpaText && templatesData.primary_trade) {
|
|
150
|
+
await fetchTcpaFromSitegenie();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (!fs.existsSync(`${defaultSettings.srcFolder}/${defaultSettings.tmpFolder}`)) {
|
|
155
|
+
fs.mkdirSync(`${defaultSettings.srcFolder}/${defaultSettings.tmpFolder}`, { recursive: true });
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
gulp.src([
|
|
159
|
+
defaultSettings.srcFolder + '/' + defaultSettings.templatesSubfolder + '/**/*.html',
|
|
160
|
+
'!' + defaultSettings.srcFolder + '/' + defaultSettings.templatesSubfolder + '/_partials/**/*.html'
|
|
161
|
+
]).pipe(gulpHandlebarsFileInclude(templatesData, {
|
|
162
|
+
maxRecursion: siteData.fileIncludeMaxRecursion || 500,
|
|
163
|
+
handlebarsHelpers
|
|
164
|
+
}))
|
|
165
|
+
.pipe(gulp.dest(defaultSettings.tmpFolder));
|
|
166
|
+
|
|
167
|
+
done();
|
|
168
|
+
}
|