mod-build 3.6.45 → 3.6.46

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.46
4
+
5
+ - Added one condition for pathSubdirectory variable to resolve a bug (CRO-3185) . Also Made little updates on add-path-subdirectories to make the code more DRY
6
+
3
7
  ## 3.6.45
4
8
 
5
9
  - Added `add-path-subdirectories` task. If `siteData.pathSubdirectory` exists at a site level, it will get the value & append the path to all of the existing RELATIVE paths (build task only – doesn't run on gulp serve). Also updated `grab-shared-scripts` to include the `pathSubdirectory` in the replacement paths during `build` if it exists.
@@ -2,8 +2,9 @@ var replace = require('gulp-replace');
2
2
 
3
3
  module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
4
4
  return function() {
5
- if (siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory) {
6
- const pathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
5
+ const isPathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
6
+ if (isPathSubdirectory) {
7
+ const pathSubdirectory = isPathSubdirectory;
7
8
 
8
9
  return gulp.src(siteSettings.distFolder + '/**/*.html')
9
10
  .pipe(replace(/(href="favicon.ico")/g, function(match, path) {
@@ -254,7 +254,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
254
254
  const useRelativePathForResources = siteData.siteData && siteData.siteData.useRelativePathForResources || siteData && siteData.useRelativePathForResources;
255
255
  isQuotePageOrUseRelativePath = isQuotePage === true || useRelativePathForResources === true;
256
256
  resourceURL = `https://${siteSettings.nodeEnv}/quote/resources`;
257
- pathSubdirectory = isLocal ? '' : siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
257
+ const isPathSubdirectory = siteData.siteData && siteData.siteData.pathSubdirectory || siteData && siteData.pathSubdirectory;
258
+ pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
258
259
  return function() {
259
260
  const { nodeEnv } = siteSettings;
260
261
  if (!nodeEnv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.45",
3
+ "version": "3.6.46",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",