mod-build 3.6.74-beta.2 → 3.6.74-beta.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.74-beta.3
4
+
5
+ - Removed the newly added update-modalytics-path task and update grab-shared-scripts to consider isPathSubdirectory flag for modalytics script path
6
+
3
7
  ## 3.6.74-beta.2
4
8
 
5
9
  - Placed update-modalytics-path task just after grab-shared-scripts
@@ -20,11 +20,6 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
20
20
  sequenceOpts.push('copy-fonts');
21
21
  }
22
22
 
23
- if (siteData.isPathSubdirectory) {
24
- const index = sequenceOpts.indexOf('grab-shared-scripts');
25
- sequenceOpts.splice(index + 1, 0, 'update-modalytics-path');
26
- }
27
-
28
23
  runSequence(...sequenceOpts, function() {
29
24
  console.log('\x1b[42m%s\x1b[0m', '✔ Build completed!');
30
25
  console.log('You can run \'gulp serve:dist\' to see production version.');
@@ -22,7 +22,8 @@ var pathSubdirectory = '';
22
22
  var componentFolderPath = '';
23
23
 
24
24
  function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
25
- const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/` : '/resources/scripts/mod-alytics/';
25
+ const doNotIncludeSrc = siteData.siteData && siteData.siteData.isPathSubdirectory || siteData && siteData.isPathSubdirectory;
26
+ const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}${doNotIncludeSrc ? '' : '{{#if this.src}}{{this.src}}{{/if}}'}resources/scripts/mod-alytics/` : '/resources/scripts/mod-alytics/';
26
27
  return gulp.src(`${siteSettings.srcFolder}/${componentFolderPath}/head/head.html`)
27
28
  .pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
28
29
  .pipe(gulp.dest(`${siteSettings.srcFolder}/${componentFolderPath}/head`));
@@ -465,18 +465,6 @@ module.exports = function() {
465
465
 
466
466
  return require(opts.gulpTasksFolderPath + '/copy-fonts')(opts.gulp, opts.gulpSettings);
467
467
  }
468
- },
469
-
470
- // Update Modalytics Path
471
- 'update-modalytics-path': {
472
- subtasks: [],
473
- func: function(opts) {
474
- if ('undefined' === typeof opts.gulpTasksFolderPath) {
475
- opts.gulpTasksFolderPath = '.';
476
- }
477
-
478
- return require(opts.gulpTasksFolderPath + '/update-modalytics-path')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
479
- }
480
468
  }
481
469
  };
482
470
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.74-beta.2",
3
+ "version": "3.6.74-beta.3",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -1,12 +0,0 @@
1
- var replace = require('gulp-replace');
2
-
3
- module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
4
- const { isLocal } = siteSettings,
5
- isPathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory,
6
- pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
7
- return function() {
8
- return gulp.src(siteSettings.srcFolder + '/shared-components/head/head.html')
9
- .pipe(replace(`${pathSubdirectory}{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/`, `${pathSubdirectory}resources/scripts/mod-alytics/`))
10
- .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/head'));
11
- };
12
- };