mod-build 3.6.2 → 3.6.3--beta.2
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.3
|
|
4
|
+
|
|
5
|
+
- Updating `cache-bust` gulp task to use dashes instead of a period. For example, cached files will now be `home-51fbcbac.js` instead of `home.51fbcbac.js`
|
|
6
|
+
|
|
3
7
|
## 3.6.2
|
|
4
8
|
|
|
5
9
|
- Adding `check-seasonal-variations` to grab seasons json; loop through the siteData for `seasonalVariations: {}`; find any active seasons; merge the json objects and adjust json content accordingly;
|
package/gulp-tasks/cache-bust.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
module.exports = function(gulp, gulpPlugins, siteSettings) {
|
|
2
|
+
var path = require('path');
|
|
2
3
|
return function() {
|
|
3
4
|
return gulp.src(siteSettings.distFolder + '/**')
|
|
4
5
|
.pipe(gulpPlugins.revAll.revision({
|
|
5
6
|
dontRenameFile: [/^\/favicon.ico$/g, '.html', '.txt', /modlogo([\w|\s|-])*\.(?:svg)/g],
|
|
6
|
-
dontUpdateReference: [/^\/favicon.ico$/g, '.html', '.txt', /modlogo([\w|\s|-])*\.(?:svg)/g]
|
|
7
|
+
dontUpdateReference: [/^\/favicon.ico$/g, '.html', '.txt', /modlogo([\w|\s|-])*\.(?:svg)/g],
|
|
8
|
+
transformFilename: function (file, hash) {
|
|
9
|
+
var ext = path.extname(file.path);
|
|
10
|
+
return path.basename(file.path, ext) + '-' + hash.substr(0, 8) + ext;
|
|
11
|
+
}
|
|
7
12
|
}))
|
|
8
13
|
.pipe(gulpPlugins.revDeleteOriginal())
|
|
9
14
|
.pipe(gulp.dest(siteSettings.distFolder))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import fetch from "node-fetch";
|
package/gulp-tasks/js-lint.js
CHANGED
|
@@ -14,6 +14,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings) {
|
|
|
14
14
|
'gulpfile.babel.js',
|
|
15
15
|
'gulp-tasks/*.js',
|
|
16
16
|
'!' + siteSettings.srcFolder + '/' + siteSettings.scriptsSubfolder + '/vendor/**/*.js', // do not lint 3rd party scripts,
|
|
17
|
+
'!' + siteSettings.srcFolder + '/' + siteSettings.scriptsSubfolder + '/resources/**/*.js', // do not lint copied shared resource scripts,
|
|
17
18
|
'!' + siteSettings.srcFolder + '/' + siteSettings.scriptsCompiledFolder + '**/*.js' // do not lint compiled scripts
|
|
18
19
|
])
|
|
19
20
|
.pipe(gulpPlugins.eslint(siteSettings.jsLint))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-build",
|
|
3
|
-
"version": "3.6.2",
|
|
3
|
+
"version": "3.6.3--beta.2",
|
|
4
4
|
"description": "Share components for S3 sites.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
"jquery": "^3.2.1",
|
|
53
53
|
"lodash": "^4.17.15",
|
|
54
54
|
"lodash.merge": "^4.6.2",
|
|
55
|
+
"node-fetch": "^3.2.10",
|
|
55
56
|
"nouislider": "^10.1.0",
|
|
57
|
+
"path": "^0.12.7",
|
|
56
58
|
"request": "^2.88.0",
|
|
57
59
|
"run-sequence": "^2.2.1",
|
|
58
60
|
"sass": "^1.49.9",
|
package/src/scripts/thankyou.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/* global modUtils locationStr */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Link this file into a TY page to render generic TYP and fire pixels
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
var thankyouPage = (function($) {
|
|
8
|
-
var getVars = modUtils.getUrlParamsToObject(),
|
|
9
|
-
apiUrl = modUtils.getApiDomain() + '/v1/';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Starts TY page
|
|
13
|
-
*/
|
|
14
|
-
var init = function() {
|
|
15
|
-
// Personalized intro copy (/thankyou page)
|
|
16
|
-
if (getVars.fName && getVars.lName) {
|
|
17
|
-
$('#intro').text(getVars.fName + ' ' + getVars.lName + ', thanks for your request.');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Location
|
|
21
|
-
if (getVars.city && getVars.state) {
|
|
22
|
-
locationStr = getVars.city + ', ' + getVars.state;
|
|
23
|
-
}
|
|
24
|
-
if (locationStr) {
|
|
25
|
-
$('[data-bind="location"]').text(locationStr);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// leadToken
|
|
29
|
-
if (getVars.leadToken) {
|
|
30
|
-
$('#leadid_token').val(getVars.leadToken);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Grab and fire the affiliate pixel if one exists and not a duplicate.
|
|
34
|
-
if (getVars.projectId && !getVars.isDupe) {
|
|
35
|
-
$.ajax({
|
|
36
|
-
url: apiUrl + 'tracking/get-typ-pixel/' + getVars.projectId,
|
|
37
|
-
type: 'GET',
|
|
38
|
-
dataType: 'json',
|
|
39
|
-
crossDomain: true,
|
|
40
|
-
success: function(response) {
|
|
41
|
-
if (!response || !response.data.pixel) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
$('body').append(response.data.pixel);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
init: init
|
|
53
|
-
};
|
|
54
|
-
})(jQuery);
|
|
55
|
-
|
|
56
|
-
$(document).ready(function() {
|
|
57
|
-
thankyouPage.init();
|
|
58
|
-
});
|