mod-build 4.0.102 → 4.0.104
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 +7 -2
- package/package.json +1 -1
- package/src/scripts/globals.js +1 -3
- package/src/scripts/plugins.js +0 -3
- package/tasks/templates.js +2 -4
- package/gulp-tasks/add-path-subdirectories.js +0 -34
- package/gulp-tasks/build-stat.js +0 -9
- package/gulp-tasks/build.js +0 -28
- package/gulp-tasks/cache-bust.js +0 -19
- package/gulp-tasks/check-seasonal-variations.js +0 -21
- package/gulp-tasks/clean.js +0 -10
- package/gulp-tasks/combine-files.js +0 -7
- package/gulp-tasks/compile.js +0 -44
- package/gulp-tasks/copy-files-to-build-path.js +0 -8
- package/gulp-tasks/copy-fonts.js +0 -6
- package/gulp-tasks/copy-json.js +0 -6
- package/gulp-tasks/copy-resources-to-dist.js +0 -6
- package/gulp-tasks/copy-videos.js +0 -6
- package/gulp-tasks/extras.js +0 -22
- package/gulp-tasks/grab-cdn.js +0 -74
- package/gulp-tasks/grab-form-helpers.js +0 -55
- package/gulp-tasks/grab-global-images.js +0 -121
- package/gulp-tasks/grab-images.js +0 -79
- package/gulp-tasks/grab-shared-components.js +0 -46
- package/gulp-tasks/grab-shared-scripts.js +0 -275
- package/gulp-tasks/grab-theme-json.js +0 -24
- package/gulp-tasks/grab-tooltips-json.js +0 -33
- package/gulp-tasks/js-lint-husky.js +0 -35
- package/gulp-tasks/js-lint.js +0 -24
- package/gulp-tasks/minify.js +0 -131
- package/gulp-tasks/sass-lint.js +0 -15
- package/gulp-tasks/serve.js +0 -74
- package/gulp-tasks/settings.js +0 -22
- package/gulp-tasks/styles.js +0 -42
- package/gulp-tasks/tasks.js +0 -475
- package/gulp-tasks/templates.js +0 -288
- package/src/data/footer.js +0 -119
- package/src/resources/data/tcpa.json +0 -4
- package/src/resources/templates/modals/about/index.hbs +0 -9
- package/src/resources/templates/modals/about/index.html +0 -9
- package/src/resources/templates/modals/contact-us/index.hbs +0 -348
- package/src/resources/templates/modals/contact-us/index.html +0 -348
- package/src/resources/templates/modals/e-sign-consent/index.hbs +0 -35
- package/src/resources/templates/modals/e-sign-consent/index.html +0 -35
- package/src/resources/templates/modals/faq/index.hbs +0 -9
- package/src/resources/templates/modals/faq/index.html +0 -9
- package/src/resources/templates/modals/privacy/index.hbs +0 -238
- package/src/resources/templates/modals/privacy/index.html +0 -238
- package/src/resources/templates/modals/terms/index.hbs +0 -166
- package/src/resources/templates/modals/terms/index.html +0 -166
- package/src/scripts/default/additional-assets.js +0 -60
- package/src/scripts/default/rage-clicking.js +0 -54
- package/src/scripts/default/show-utility-providers.js +0 -28
- package/src/scripts/url-cleaner.js +0 -8
- package/src/scripts/vendor/google-tag-manager-head.js +0 -6
- package/src/scripts/vendor/heap-addeventproperties-identify.js +0 -262
- package/src/scripts/vendor/heap-tracking.js +0 -9
- package/src/styles/partials/_contact-us.scss +0 -196
- package/src/styles/partials/_google-address-autocomplete.scss +0 -52
- package/src/styles/partials/_mixins.scss +0 -39
- package/src/styles/partials/_modal-pages.scss +0 -125
- package/src/styles/partials/_modernize-colors.scss +0 -128
- package/src/styles/partials/_qs-footer.scss +0 -68
- package/src/styles/partials/_quote-footer-v1.scss +0 -79
- package/src/styles/partials/_quote-footer-v2.scss +0 -64
- package/src/styles/partials/_quote-footer-v3.scss +0 -65
- package/src/templates/_partials/scripts/deferred-styles.html +0 -16
- package/src/templates/_partials/scripts/heap-bundle.html +0 -5
- package/src/templates/_partials/scripts/heap.html +0 -4
- package/src/templates/_partials/scripts/utm-params.html +0 -9
- package/src/templates/components/qs-footer.html +0 -55
- package/src/templates/components/quote-footer-v1.html +0 -148
- package/src/templates/components/quote-footer-v2.html +0 -169
- /package/tasks/{addSeasonalchanges.js → add-seasonal-changes.js} +0 -0
- /package/tasks/{setupDevOpsTrackingId.js → setup-dev-ops-tracking-id.js} +0 -0
package/gulp-tasks/serve.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// Serve site from src folder
|
|
2
|
-
module.exports.src = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
3
|
-
return function() {
|
|
4
|
-
var runSequence = require('run-sequence');
|
|
5
|
-
var sequenceOpts;
|
|
6
|
-
if (siteData.useTypescript) {
|
|
7
|
-
sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'grab-shared-scripts', 'grab-form-helpers', 'templates', 'styles', 'compile', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
|
|
8
|
-
} else if (siteData.isQSPage) {
|
|
9
|
-
sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'grab-shared-scripts', 'grab-form-helpers', 'templates', 'styles', 'grab-theme-json', 'grab-tooltips-json', 'combine-files', 'grab-images', 'js-lint'];
|
|
10
|
-
} else {
|
|
11
|
-
sequenceOpts = ['clean', 'grab-cdn', 'grab-shared-components', 'grab-shared-scripts', 'grab-form-helpers', 'templates', 'styles', 'grab-tooltips-json', 'combine-files', 'grab-images','grab-global-images', 'js-lint'];
|
|
12
|
-
}
|
|
13
|
-
runSequence(...sequenceOpts, () => {
|
|
14
|
-
// Run a BrowserSync server
|
|
15
|
-
gulpPlugins.browserSync({
|
|
16
|
-
notify: false,
|
|
17
|
-
port: 9000,
|
|
18
|
-
server: {
|
|
19
|
-
baseDir: siteSettings.browserSyncServeFolders,
|
|
20
|
-
routes: {
|
|
21
|
-
'/node_modules': 'node_modules'
|
|
22
|
-
},
|
|
23
|
-
middleware: function(req, res, next) {
|
|
24
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
25
|
-
next();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// If any assets have changed, reload the page
|
|
31
|
-
gulp.watch([
|
|
32
|
-
siteSettings.tmpFolder + '/**/*.html',
|
|
33
|
-
siteSettings.tmpFolder + '/' + siteSettings.fontsSubfolder + '/**/*',
|
|
34
|
-
siteSettings.srcFolder + '/' + siteSettings.scriptsSubfolder + '/**/*.js',
|
|
35
|
-
siteSettings.srcFolder + '/' + siteSettings.imagesSubfolder + '/**/*'
|
|
36
|
-
]).on('change', gulpPlugins.browserSync.reload);
|
|
37
|
-
|
|
38
|
-
// If templates changed, rerun templates task
|
|
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
|
-
}
|
|
46
|
-
|
|
47
|
-
// If styles changed, rerun styles task
|
|
48
|
-
gulp.watch(siteSettings.srcFolder + '/' + siteSettings.stylesSubfolder + '/**/*.scss', ['styles']);
|
|
49
|
-
|
|
50
|
-
// If scripts changed, rerun js-lint task
|
|
51
|
-
gulp.watch([
|
|
52
|
-
siteSettings.srcFolder + '/' + siteSettings.scriptsSubfolder + '/**/*.js',
|
|
53
|
-
siteSettings.srcFolder + '/' + siteSettings.scriptsSubfolder + '/**/*.ts',
|
|
54
|
-
'!' + siteSettings.srcFolder + '/' + siteSettings.scriptsCompiledFolder + '**/*.js', // dont reload on compilation pipe
|
|
55
|
-
'gulpfile.babel.js',
|
|
56
|
-
'gulp-tasks/*.js'
|
|
57
|
-
], ['compile', 'js-lint']);
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Serve site from dist folder
|
|
63
|
-
module.exports.dist = function(gulp, gulpPlugins, siteSettings) {
|
|
64
|
-
return function() {
|
|
65
|
-
// Run a BrowserSync server
|
|
66
|
-
gulpPlugins.browserSync({
|
|
67
|
-
notify: false,
|
|
68
|
-
port: 9000,
|
|
69
|
-
server: {
|
|
70
|
-
baseDir: [siteSettings.distFolder]
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
};
|
package/gulp-tasks/settings.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Settings for Gulp tasks (e.g. folder structure)
|
|
3
|
-
* @returns {Object} - folders
|
|
4
|
-
*/
|
|
5
|
-
module.exports = function() {
|
|
6
|
-
return {
|
|
7
|
-
tmpFolder: '.tmp',
|
|
8
|
-
srcFolder: 'src',
|
|
9
|
-
browserSyncServeFolders: ['.tmp', 'src', 'node_modules/mod-style-bootstrap/src', 'node_modules/mod-base/src'],
|
|
10
|
-
distFolder: 'dist',
|
|
11
|
-
fontsSubfolder: 'fonts',
|
|
12
|
-
imagesSubfolder: 'images',
|
|
13
|
-
stylesSubfolder: 'styles',
|
|
14
|
-
scriptsSubfolder: 'scripts',
|
|
15
|
-
scriptsCompiledFolder: 'scripts/compiled',
|
|
16
|
-
templatesSubfolder: 'templates',
|
|
17
|
-
dataSubfolder: 'data',
|
|
18
|
-
nodeEnv: process.env.NODE_ENV, // eslint-disable-line no-undef
|
|
19
|
-
isLocal: process.env.IS_LOCAL, // eslint-disable-line no-undef
|
|
20
|
-
buildPath: process.env.BUILD_PATH // eslint-disable-line no-undef
|
|
21
|
-
};
|
|
22
|
-
};
|
package/gulp-tasks/styles.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const sass = require('gulp-sass')(require('sass'));
|
|
2
|
-
|
|
3
|
-
module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
4
|
-
// Default autoprefixer settings
|
|
5
|
-
if ('undefined' === typeof siteSettings.autoprefixerBrowsers) {
|
|
6
|
-
siteSettings.autoprefixerBrowsers = [
|
|
7
|
-
'last 3 versions',
|
|
8
|
-
'ie >= 8',
|
|
9
|
-
'ios >= 7',
|
|
10
|
-
'android >= 4.4',
|
|
11
|
-
'bb >= 10'
|
|
12
|
-
];
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const { isLocal, nodeEnv, buildPath } = siteSettings;
|
|
16
|
-
const { isWhiteLabel } = siteData;
|
|
17
|
-
let assetsPath = isLocal ? '/temp/assets' : 'https://' + nodeEnv + '/quote/resources/assets';
|
|
18
|
-
assetsPath = isWhiteLabel ? '' : assetsPath;
|
|
19
|
-
|
|
20
|
-
return function() {
|
|
21
|
-
return gulp.src(siteSettings.srcFolder + '/styles/**/*.scss')
|
|
22
|
-
.pipe(gulpPlugins.plumber())
|
|
23
|
-
.pipe(gulpPlugins.sourcemaps.init())
|
|
24
|
-
.pipe(gulpPlugins.sassVariables({
|
|
25
|
-
$path: assetsPath,
|
|
26
|
-
$buildPath: isLocal ? '' : buildPath
|
|
27
|
-
}))
|
|
28
|
-
.pipe(sass.sync({
|
|
29
|
-
outputStyle: 'expanded',
|
|
30
|
-
precision: 10,
|
|
31
|
-
includePaths: ['.']
|
|
32
|
-
}).on('error', sass.logError))
|
|
33
|
-
.pipe(gulpPlugins.autoprefixer({
|
|
34
|
-
browsers: siteSettings.autoprefixerBrowsers
|
|
35
|
-
}))
|
|
36
|
-
.pipe(gulpPlugins.sourcemaps.write())
|
|
37
|
-
.pipe(gulp.dest(siteSettings.tmpFolder + '/styles'))
|
|
38
|
-
.pipe(gulpPlugins.browserSync.reload({
|
|
39
|
-
stream: true
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
};
|
package/gulp-tasks/tasks.js
DELETED
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All Gulp tasks that could be used in mod-site powered sites
|
|
3
|
-
* @returns {Object} - Gulp tasks object
|
|
4
|
-
*/
|
|
5
|
-
module.exports = function() {
|
|
6
|
-
var tasks = {
|
|
7
|
-
// Compile templates into html files
|
|
8
|
-
'templates': {
|
|
9
|
-
subtasks: [],
|
|
10
|
-
func: function(opts) {
|
|
11
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
12
|
-
opts.gulpTasksFolderPath = '.';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return require(opts.gulpTasksFolderPath + '/templates')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// Compile scss files into css files
|
|
20
|
-
'styles': {
|
|
21
|
-
subtasks: ['sass-lint'],
|
|
22
|
-
func: function(opts) {
|
|
23
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
24
|
-
opts.gulpTasksFolderPath = '.';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return require(opts.gulpTasksFolderPath + '/styles')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
// Grab html files from CDN so they can be swapped into build
|
|
32
|
-
'grab-cdn': {
|
|
33
|
-
subtasks: [],
|
|
34
|
-
func: function(opts) {
|
|
35
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
36
|
-
opts.gulpTasksFolderPath = '.';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (opts.siteData.useCDN) {
|
|
40
|
-
return require(opts.gulpTasksFolderPath + '/grab-cdn')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
// Grab form helpers files from CDN
|
|
46
|
-
'grab-form-helpers': {
|
|
47
|
-
subtasks: [],
|
|
48
|
-
func: function(opts) {
|
|
49
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
50
|
-
opts.gulpTasksFolderPath = '.';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (opts.siteData.useCDN) {
|
|
54
|
-
return require(opts.gulpTasksFolderPath + '/grab-form-helpers')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
// Grab component files from CDN so they can be swapped into build
|
|
60
|
-
'grab-shared-components': {
|
|
61
|
-
subtasks: [],
|
|
62
|
-
func: function(opts) {
|
|
63
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
64
|
-
opts.gulpTasksFolderPath = '.';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return require(opts.gulpTasksFolderPath + '/grab-shared-components')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
// Grab shared scripts from CDN so they can swapped into build
|
|
72
|
-
'grab-shared-scripts': {
|
|
73
|
-
subtasks: [],
|
|
74
|
-
func: function(opts) {
|
|
75
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
76
|
-
opts.gulpTasksFolderPath = '.';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return require(opts.gulpTasksFolderPath + '/grab-shared-scripts')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
// Link scss files
|
|
84
|
-
'sass-lint': {
|
|
85
|
-
subtasks: [],
|
|
86
|
-
func: function(opts) {
|
|
87
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
88
|
-
opts.gulpTasksFolderPath = '.';
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return require(opts.gulpTasksFolderPath + '/sass-lint')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
// Link JS files
|
|
96
|
-
'js-lint': {
|
|
97
|
-
subtasks: [],
|
|
98
|
-
func: function(opts) {
|
|
99
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
100
|
-
opts.gulpTasksFolderPath = '.';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return require(opts.gulpTasksFolderPath + '/js-lint')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
// Link JS files and fail on errors and warnings (for Husky)
|
|
108
|
-
'js-lint-husky': {
|
|
109
|
-
subtasks: [],
|
|
110
|
-
func: function(opts) {
|
|
111
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
112
|
-
opts.gulpTasksFolderPath = '.';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return require(opts.gulpTasksFolderPath + '/js-lint-husky')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
// Minify html files & copy into dist folder
|
|
120
|
-
'html-min': {
|
|
121
|
-
subtasks: [],
|
|
122
|
-
func: function(opts) {
|
|
123
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
124
|
-
opts.gulpTasksFolderPath = '.';
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return require(opts.gulpTasksFolderPath + '/minify').html(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// Minify css files & copy into dist folder
|
|
132
|
-
'css-min': {
|
|
133
|
-
subtasks: [],
|
|
134
|
-
func: function(opts) {
|
|
135
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
136
|
-
opts.gulpTasksFolderPath = '.';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return require(opts.gulpTasksFolderPath + '/minify').css(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
// Compile typescript
|
|
144
|
-
'compile': {
|
|
145
|
-
subtasks: [],
|
|
146
|
-
func: function(opts) {
|
|
147
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
148
|
-
opts.gulpTasksFolderPath = '.';
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (opts.siteData.useTypescript) {
|
|
152
|
-
return require(opts.gulpTasksFolderPath + '/compile')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, 'development');
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
// Compile for prod
|
|
158
|
-
'compile-prod': {
|
|
159
|
-
subtasks: [],
|
|
160
|
-
func: function(opts) {
|
|
161
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
162
|
-
opts.gulpTasksFolderPath = '.';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (opts.siteData.useTypescript) {
|
|
166
|
-
return require(opts.gulpTasksFolderPath + '/compile')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, 'production');
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
// Minify js files & copy into dist folder
|
|
172
|
-
'js-min': {
|
|
173
|
-
subtasks: [],
|
|
174
|
-
func: function(opts) {
|
|
175
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
176
|
-
opts.gulpTasksFolderPath = '.';
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return require(opts.gulpTasksFolderPath + '/minify').js(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
// Minify JPG images
|
|
184
|
-
'img-min-jpg': {
|
|
185
|
-
subtasks: [],
|
|
186
|
-
func: function(opts) {
|
|
187
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
188
|
-
opts.gulpTasksFolderPath = '.';
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return require(opts.gulpTasksFolderPath + '/minify').imgJpg(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
// Minify PNG images
|
|
196
|
-
'img-min-png': {
|
|
197
|
-
subtasks: [],
|
|
198
|
-
func: function(opts) {
|
|
199
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
200
|
-
opts.gulpTasksFolderPath = '.';
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return require(opts.gulpTasksFolderPath + '/minify').imgPng(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
// Minify GIF images
|
|
208
|
-
'img-min-gif': {
|
|
209
|
-
subtasks: [],
|
|
210
|
-
func: function(opts) {
|
|
211
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
212
|
-
opts.gulpTasksFolderPath = '.';
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return require(opts.gulpTasksFolderPath + '/minify').imgGif(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
// Minify SVG images
|
|
220
|
-
'img-min-svg': {
|
|
221
|
-
subtasks: [],
|
|
222
|
-
func: function(opts) {
|
|
223
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
224
|
-
opts.gulpTasksFolderPath = '.';
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return require(opts.gulpTasksFolderPath + '/minify').imgSvg(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
// Minify WEBP images
|
|
232
|
-
'img-min-webp': {
|
|
233
|
-
subtasks: [],
|
|
234
|
-
func: function(opts) {
|
|
235
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
236
|
-
opts.gulpTasksFolderPath = '.';
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return require(opts.gulpTasksFolderPath + '/minify').imgWebp(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
// Minify images & copy into dist folder
|
|
244
|
-
'img-min': {
|
|
245
|
-
subtasks: ['img-min-jpg', 'img-min-png', 'img-min-gif', 'img-min-svg', 'img-min-webp'],
|
|
246
|
-
func: function(opts) {
|
|
247
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
248
|
-
opts.gulpTasksFolderPath = '.';
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return require(opts.gulpTasksFolderPath + '/minify').img(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
// Extra actions on build
|
|
256
|
-
'extras': {
|
|
257
|
-
subtasks: [],
|
|
258
|
-
func: function(opts) {
|
|
259
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
260
|
-
opts.gulpTasksFolderPath = '.';
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return require(opts.gulpTasksFolderPath + '/extras')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
|
|
267
|
-
// Remove .tmp and dist folders from the repo
|
|
268
|
-
'clean': {
|
|
269
|
-
subtasks: [],
|
|
270
|
-
func: function(opts) {
|
|
271
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
272
|
-
opts.gulpTasksFolderPath = '.';
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return require(opts.gulpTasksFolderPath + '/clean')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
// Cache bust assets
|
|
280
|
-
'cache-bust': {
|
|
281
|
-
subtasks: [],
|
|
282
|
-
func: function(opts) {
|
|
283
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
284
|
-
opts.gulpTasksFolderPath = '.';
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
return require(opts.gulpTasksFolderPath + '/cache-bust')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
// Start dev mode
|
|
292
|
-
'serve': {
|
|
293
|
-
subtasks: [],
|
|
294
|
-
func: function(opts) {
|
|
295
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
296
|
-
opts.gulpTasksFolderPath = '.';
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
return require(opts.gulpTasksFolderPath + '/serve').src(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
// Serve files from dist folder
|
|
304
|
-
'serve:dist': {
|
|
305
|
-
func: function(opts) {
|
|
306
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
307
|
-
opts.gulpTasksFolderPath = '.';
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return require(opts.gulpTasksFolderPath + '/serve').dist(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
// Show production site stay
|
|
315
|
-
'build-stat': {
|
|
316
|
-
func: function(opts) {
|
|
317
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
318
|
-
opts.gulpTasksFolderPath = '.';
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
return require(opts.gulpTasksFolderPath + '/build-stat')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
// Get images
|
|
326
|
-
'combine-files': {
|
|
327
|
-
subtasks: [],
|
|
328
|
-
func: function(opts) {
|
|
329
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
330
|
-
opts.gulpTasksFolderPath = '.';
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
return require(opts.gulpTasksFolderPath + '/combine-files')(opts.gulp, opts.gulpPlugins, opts.gulpSettings);
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
// Get images
|
|
338
|
-
'grab-images': {
|
|
339
|
-
subtasks: [],
|
|
340
|
-
func: function(opts) {
|
|
341
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
342
|
-
opts.gulpTasksFolderPath = '.';
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return require(opts.gulpTasksFolderPath + '/grab-images')(opts.gulp, opts.gulpSettings, opts.siteData);
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
|
|
349
|
-
// Get global images
|
|
350
|
-
'grab-global-images': {
|
|
351
|
-
subtasks: [],
|
|
352
|
-
func: function(opts) {
|
|
353
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
354
|
-
opts.gulpTasksFolderPath = '.';
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
return require(opts.gulpTasksFolderPath + '/grab-global-images')(opts.gulp, opts.gulpSettings, opts.siteData);
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
// Copy json files to dist
|
|
362
|
-
'copy-json': {
|
|
363
|
-
subtasks: [],
|
|
364
|
-
func: function(opts) {
|
|
365
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
366
|
-
opts.gulpTasksFolderPath = '.';
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
return require(opts.gulpTasksFolderPath + '/copy-json')(opts.gulp, opts.gulpSettings);
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
// Copy files to build path
|
|
374
|
-
'copy-files-to-build-path': {
|
|
375
|
-
subtasks: [],
|
|
376
|
-
func: function(opts) {
|
|
377
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
378
|
-
opts.gulpTasksFolderPath = '.';
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
return require(opts.gulpTasksFolderPath + '/copy-files-to-build-path')(opts.gulp, opts.gulpSettings);
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
|
|
385
|
-
// Copy videos
|
|
386
|
-
'copy-videos': {
|
|
387
|
-
subtasks: [],
|
|
388
|
-
func: function(opts) {
|
|
389
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
390
|
-
opts.gulpTasksFolderPath = '.';
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return require(opts.gulpTasksFolderPath + '/copy-videos')(opts.gulp, opts.gulpSettings);
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
|
|
397
|
-
// Grab theme json file from shared resources
|
|
398
|
-
'grab-theme-json': {
|
|
399
|
-
subtasks: [],
|
|
400
|
-
func: function(opts) {
|
|
401
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
402
|
-
opts.gulpTasksFolderPath = '.';
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
if (opts.siteData.page && opts.siteData.page.themeFile) {
|
|
406
|
-
return require(opts.gulpTasksFolderPath + '/grab-theme-json')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
|
|
411
|
-
// Grab tooltips json file from shared resources
|
|
412
|
-
'grab-tooltips-json': {
|
|
413
|
-
subtasks: [],
|
|
414
|
-
func: function(opts) {
|
|
415
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
416
|
-
opts.gulpTasksFolderPath = '.';
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
return require(opts.gulpTasksFolderPath + '/grab-tooltips-json')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
420
|
-
}
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
// copy resources directory into dist
|
|
424
|
-
'copy-resources-to-dist': {
|
|
425
|
-
subtasks: [],
|
|
426
|
-
func: function(opts) {
|
|
427
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
428
|
-
opts.gulpTasksFolderPath = '.';
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
return require(opts.gulpTasksFolderPath + '/copy-resources-to-dist')(opts.gulp, opts.gulpSettings);
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
// If siteData.pathSubdirectory exists...append the directory path to all of the existing RELATIVE URL paths
|
|
436
|
-
'add-path-subdirectories': {
|
|
437
|
-
subtasks: [],
|
|
438
|
-
func: function(opts) {
|
|
439
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
440
|
-
opts.gulpTasksFolderPath = '.';
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
return require(opts.gulpTasksFolderPath + '/add-path-subdirectories')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
444
|
-
}
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
// Create a build
|
|
448
|
-
'build': {
|
|
449
|
-
func: function(opts) {
|
|
450
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
451
|
-
opts.gulpTasksFolderPath = '.';
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
return require(opts.gulpTasksFolderPath + '/build')(opts.gulp, opts.gulpPlugins, opts.gulpSettings, opts.siteData);
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
// Copy fonts
|
|
459
|
-
'copy-fonts': {
|
|
460
|
-
subtasks: [],
|
|
461
|
-
func: function(opts) {
|
|
462
|
-
if ('undefined' === typeof opts.gulpTasksFolderPath) {
|
|
463
|
-
opts.gulpTasksFolderPath = '.';
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
return require(opts.gulpTasksFolderPath + '/copy-fonts')(opts.gulp, opts.gulpSettings);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
// Set 'gulp' to run 'build'
|
|
472
|
-
tasks.default = tasks.build;
|
|
473
|
-
|
|
474
|
-
return tasks;
|
|
475
|
-
};
|