mod-build 3.6.99-beta.3 → 3.6.99-beta.5

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.
@@ -7,6 +7,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
7
7
  /* eslint brace-style: 0 */
8
8
  const { isLocal, nodeEnv, buildPath } = siteSettings;
9
9
  const { isWhiteLabel } = siteData;
10
+ const isPathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
11
+ pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
10
12
 
11
13
  var commonData = require('../src/data/common.js');
12
14
 
@@ -304,9 +306,11 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
304
306
  finalTCPA = finalTCPA.replace(removeInlineStyleRegex, '');
305
307
 
306
308
  // Adjustments for Modernize Consent Capture (will be adjusted with O&O Consent Implementation)
307
- finalTCPA = finalTCPA.replace('Modernize', '<label><input class="consent-capture" type="checkbox" data-name="Modernize" data-key="33940610" checked /> Modernize</label>');
308
- const tcpaPrivacyAndTerms = ' Please see our <a id="tcpaPrivacy" href="/?modal=tcpaPrivacy" data-load="/resources/templates/modals/privacy/" data-bind="modal-page">Privacy Notice</a> and our <a id="tcpaTerms" href="/?modal=tcpaTerms" data-load="/resources/templates/modals/terms/" data-bind="modal-page">Terms of Use</a>';
309
- finalTCPA += tcpaPrivacyAndTerms;
309
+ if (finalTCPA.includes('Modernize and up to ')) {
310
+ finalTCPA = finalTCPA.replace('Modernize', '<label><input class="consent-capture" type="checkbox" data-name="Modernize" data-key="33940610" checked /> Modernize</label>');
311
+ const tcpaPrivacyAndTerms = ` Please see our <a id="tcpaPrivacy" href="/?modal=tcpaPrivacy" data-load="${pathSubdirectory ? pathSubdirectory : '/'}resources/templates/modals/privacy/" data-bind="modal-page">Privacy Notice</a> and our <a id="tcpaTerms" href="/?modal=tcpaTerms" data-load="${pathSubdirectory ? pathSubdirectory : '/'}resources/templates/modals/terms/" data-bind="modal-page">Terms of Use</a>.`;
312
+ finalTCPA += tcpaPrivacyAndTerms;
313
+ }
310
314
 
311
315
  templatesData.tcpaText = await finalTCPA;
312
316
  resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.99-beta.3",
3
+ "version": "3.6.99-beta.5",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",