mod-build 3.6.22-beta.3 → 3.6.22-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.
@@ -31,7 +31,6 @@ function streamToDestination(gulp, siteSettings, url, fileName) {
31
31
 
32
32
  function replaceImagePath(gulp, siteSettings) {
33
33
  var finalDestination;
34
- var stream = gulp.src(`${finalDestination}/index.html`);
35
34
 
36
35
  if (!fs.existsSync(siteSettings.distFolder)) {
37
36
  finalDestination = siteSettings.tmpFolder;
@@ -39,6 +38,8 @@ function replaceImagePath(gulp, siteSettings) {
39
38
  finalDestination = siteSettings.distFolder;
40
39
  }
41
40
 
41
+ var stream = gulp.src(`${finalDestination}/index.html`);
42
+
42
43
  if (images.length) {
43
44
  images.forEach(function(image) {
44
45
  stream = stream.pipe(replace(new RegExp(`"(?:(?!"|")[\\s\\S])+(${image})"`, 'gm'), '"/resources/images/' + image + '"'))
@@ -36,7 +36,13 @@ module.exports.src = function(gulp, gulpPlugins, siteSettings, siteData) {
36
36
  ]).on('change', gulpPlugins.browserSync.reload);
37
37
 
38
38
  // If templates changed, rerun templates task
39
- gulp.watch(siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/**/*.html', ['templates']);
39
+ if (!siteData.useTypescript && !siteData.isQSPage) {
40
+ gulp.watch(siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/**/*.html', function() {
41
+ runSequence('templates','grab-global-images')
42
+ });
43
+ } else {
44
+ gulp.watch(siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/**/*.html', ['templates'])
45
+ }
40
46
 
41
47
  // If styles changed, rerun styles task
42
48
  gulp.watch(siteSettings.srcFolder + '/' + siteSettings.stylesSubfolder + '/**/*.scss', ['styles']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.22-beta.3",
3
+ "version": "3.6.22-beta.5",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"