mod-build 3.5.1--beta.18 → 3.5.1--beta.21

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.5.1
4
+
5
+ - `grab-shared-components` task was created; added to tasks.js, serve.js & build.js to grab the new shared-components folder from mod-site and copy them to your local env
6
+
3
7
  ## 3.5.0
4
8
 
5
9
  - `gulp-sass` package updated to version 5 to make it compatible with active LTS version of node
@@ -5,15 +5,15 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
5
5
  var sequenceOpts;
6
6
 
7
7
  if (siteData.useTypescript) {
8
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'compile-prod', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'build-stat'];
8
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'compile-prod', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'build-stat'];
9
9
  } else if (siteData.isWhiteLabel) {
10
10
  if (siteData.isQSPage) {
11
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'grab-theme-json', 'combine-files', 'grab-images', 'copy-json', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'copy-files-to-build-path', 'cache-bust', 'grab-tooltips-json', 'build-stat'];
11
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'grab-theme-json', 'combine-files', 'grab-images', 'copy-json', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'copy-files-to-build-path', 'cache-bust', 'grab-tooltips-json', 'build-stat'];
12
12
  } else {
13
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'combine-files', 'grab-images', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'grab-tooltips-json', 'build-stat'];
13
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'combine-files', 'grab-images', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'grab-tooltips-json', 'build-stat'];
14
14
  }
15
15
  } else {
16
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'build-stat'];
16
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'js-lint', 'html-min', 'css-min', 'js-min', 'img-min', 'extras', 'brand', 'cache-bust', 'build-stat'];
17
17
  }
18
18
 
19
19
  runSequence(...sequenceOpts, function() {
@@ -32,7 +32,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
32
32
  '/templates/modals/privacy/': ['/templates/modals/privacy/', 'index.html'],
33
33
  '/templates/modals/terms/': ['/templates/modals/terms/', 'index.html'],
34
34
  '/templates/qs-modals/contact-us/': ['/templates/modals/contact-us/', 'index.html'],
35
- '/templates/scripts/trusted-form.html': ['/templates/scripts/', 'trusted-form.html'],
35
+ '/templates/scripts/trusted-form.html': ['/templates/scripts/', 'trusted-form.html']
36
36
  };
37
37
 
38
38
  if (includeFaqLink) {
@@ -5,7 +5,6 @@ function streamToDestination(gulp, siteSettings, inputPath, destPath, fileName)
5
5
  return new Promise(resolve => { // eslint-disable-line no-undef
6
6
  request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site${inputPath}`)
7
7
  .on('response', resp => {
8
- console.log(resp.statusCode);
9
8
  if (resp.statusCode !== 200) {
10
9
  throw new Error(`${resp.statusCode} Error while fetching ${fileName}`);
11
10
  }
@@ -28,8 +27,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
28
27
  // key: inputPath, value: destPath
29
28
 
30
29
  externalResources = {
31
- '/shared-components/carousel/index.html': ['/shared-components/carousel', 'index.html'],
32
- '/shared-components/carousel/_styles.scss': ['/shared-components/carousel', 'styles.scss']
30
+ '/shared-components/**/*.html': ['/shared-components/**', '*.html'],
31
+ '/shared-components/**/*.scss': ['/shared-components/**', '_*.scss']
33
32
  };
34
33
 
35
34
  if (!nodeEnv) {
@@ -4,11 +4,11 @@ module.exports.src = function(gulp, gulpPlugins, siteSettings, siteData) {
4
4
  var runSequence = require('run-sequence');
5
5
  var sequenceOpts;
6
6
  if (siteData.useTypescript) {
7
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'compile', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
7
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'compile', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
8
8
  } else if (siteData.isQSPage) {
9
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'grab-theme-json', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
9
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'grab-theme-json', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
10
10
  } else {
11
- sequenceOpts = ['clean', 'grab-cdn', 'grab-components', 'templates', 'styles', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
11
+ sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'templates', 'styles', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
12
12
  }
13
13
  runSequence(...sequenceOpts, () => {
14
14
  // Run a BrowserSync server
@@ -43,7 +43,7 @@ module.exports = function() {
43
43
  },
44
44
 
45
45
  // Grab component scss files from CDN so they can be swapped into build
46
- 'grab-components': {
46
+ 'grab-shared-components': {
47
47
  subtasks: [],
48
48
  func: function(opts) {
49
49
  if ('undefined' === typeof opts.gulpTasksFolderPath) {
@@ -51,7 +51,7 @@ module.exports = function() {
51
51
  }
52
52
 
53
53
  if (opts.siteData.useCDN) {
54
- return require(opts.gulpTasksFolderPath + '/grab-components')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
54
+ return require(opts.gulpTasksFolderPath + '/grab-shared-components')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
55
55
  }
56
56
  }
57
57
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.5.1--beta.18",
3
+ "version": "3.5.1--beta.21",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"