Skip to content

Commit

Permalink
Fix for Issue 6117: Added Module Name in Build to Comments (#6297)
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-harshad-mane authored Feb 12, 2021
1 parent f672209 commit 2702e96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const execa = require('execa');

var prebid = require('./package.json');
var dateString = 'Updated : ' + (new Date()).toISOString().substring(0, 10);
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + ' */\n';
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + '\nModules: <%= modules %> */\n';
var port = 9999;
const FAKE_SERVER_HOST = argv.host ? argv.host : 'localhost';
const FAKE_SERVER_PORT = 4444;
Expand Down Expand Up @@ -157,12 +157,13 @@ function makeWebpackPkg() {

const analyticsSources = helpers.getAnalyticsSources();
const moduleSources = helpers.getModulePaths(externalModules);
const modulesString = (externalModules.length > 0) ? externalModules.join(', ') : 'All available modules in current version.';

return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
.pipe(webpackStream(cloned, webpack))
.pipe(uglify())
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid })))
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid, modules: modulesString })))
.pipe(gulp.dest('build/dist'));
}

Expand Down

0 comments on commit 2702e96

Please sign in to comment.