mod-build 3.6.15-beta.1 → 3.6.15-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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var request = require('request');
|
|
2
2
|
var source = require('vinyl-source-stream');
|
|
3
3
|
var replace = require('gulp-replace');
|
|
4
|
-
var hash = require('gulp-hash');
|
|
4
|
+
var hash = require('gulp-hash-filename');
|
|
5
5
|
var tap = require('gulp-tap');
|
|
6
6
|
var path = require('path');
|
|
7
7
|
|
|
@@ -34,6 +34,7 @@ function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
34
34
|
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"/, resourcePath + '/mod-utils/' + fileNames.modUtilsFileName))
|
|
35
35
|
.pipe(replace(/"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"/, resourcePath + '/footer/' + fileNames.footerComponentJsFileName))
|
|
36
36
|
.pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.modFormFileName))
|
|
37
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(form\/mod-form-beta.*?)js"/, resourcePath + '/mod-form/form/' + fileNames.newModFormFileName))
|
|
37
38
|
.pipe(replace(/"(?:(?!"|")[\s\S])+(qs-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.qsFormFileName))
|
|
38
39
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
|
|
39
40
|
}
|
|
@@ -94,8 +95,7 @@ function getResource(url, config = {}) {
|
|
|
94
95
|
})
|
|
95
96
|
.pipe(source(`${file}`))
|
|
96
97
|
.pipe(hash({
|
|
97
|
-
|
|
98
|
-
template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
|
|
98
|
+
"format": "{name}.{hash}.{ext}"
|
|
99
99
|
}))
|
|
100
100
|
.pipe(tap(function(file, t){
|
|
101
101
|
fileNames[config.fileName] = path.basename(file.path);
|
|
@@ -187,6 +187,16 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
187
187
|
srcReplaceFn: null,
|
|
188
188
|
additionalSrcReplaceFns: []
|
|
189
189
|
},
|
|
190
|
+
copyNewModForm: {
|
|
191
|
+
url: `mod-form/form/mod-form-beta.min.js`,
|
|
192
|
+
mapUrl: `mod-form/form/mod-form-beta.min.js.map`,
|
|
193
|
+
config: {
|
|
194
|
+
fileName: 'newModFormFileName',
|
|
195
|
+
dest: 'scripts/mod-form/form'
|
|
196
|
+
},
|
|
197
|
+
srcReplaceFn: null,
|
|
198
|
+
additionalSrcReplaceFns: []
|
|
199
|
+
},
|
|
190
200
|
copyQsForm: {
|
|
191
201
|
url: `mod-form/qs-form.min.js`,
|
|
192
202
|
mapUrl: `mod-form/qs-form.min.js.map`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-build",
|
|
3
|
-
"version": "3.6.15-beta.
|
|
3
|
+
"version": "3.6.15-beta.2",
|
|
4
4
|
"description": "Share components for S3 sites.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"gulp-filter": "^5.0.0",
|
|
27
27
|
"gulp-handlebars-file-include": "^1.0.0",
|
|
28
28
|
"gulp-hash": "^4.2.2",
|
|
29
|
+
"gulp-hash-filename": "^4.0.0",
|
|
29
30
|
"gulp-htmlmin": "^3.0.0",
|
|
30
31
|
"gulp-if": "^2.0.2",
|
|
31
32
|
"gulp-imagemin": "^3.2.0",
|