Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
curlyblueeagle committed Apr 28, 2021
2 parents 74de79c + 71d75c4 commit e8a1add
Show file tree
Hide file tree
Showing 101 changed files with 5,594 additions and 1,273 deletions.
4 changes: 4 additions & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ General gulp commands include separate commands for serving the codebase on a bu
Documentation they're supposed to be following is https://docs.prebid.org/dev-docs/bidder-adaptor.html

Follow steps above for general review process. In addition, please verify the following:
- Verify the biddercode and aliases are valid:
- Lower case alphanumeric with the only special character allowed is underscore.
- The bidder code should be unique for the first 6 characters
- Reserved words that cannot be used as bidder names: all, context, data, general, prebid, and skadn
- Verify that bidder has submitted valid bid params and that bids are being received.
- Verify that bidder is not manipulating the prebid.js auction in any way or doing things that go against the principles of the project. If unsure check with the Tech Lead.
- Verify that code re-use is being done properly and that changes introduced by a bidder don't impact other bidders.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ Or for Babel 6:
Then you can use Prebid.js as any other npm depedendency

```javascript
import prebid from 'prebid.js';
import pbjs from 'prebid.js';
import 'prebid.js/modules/rubiconBidAdapter'; // imported modules will register themselves automatically with prebid
import 'prebid.js/modules/appnexusBidAdapter';
prebid.processQueue(); // required to process existing pbjs.queue blocks and setup any further pbjs.queue execution
pbjs.processQueue(); // required to process existing pbjs.queue blocks and setup any further pbjs.queue execution

prebid.requestBids({
pbjs.requestBids({
...
})

Expand Down
4 changes: 2 additions & 2 deletions browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"device": null,
"os": "Windows"
},
"bs_chrome_80_windows_10": {
"bs_chrome_89_windows_10": {
"base": "BrowserStack",
"os_version": "10",
"browser": "chrome",
"browser_version": "80.0",
"browser_version": "89.0",
"device": null,
"os": "Windows"
},
Expand Down
13 changes: 10 additions & 3 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 + '\nModules: <%= modules %> */\n';
var banner = '/* <%= prebid.name %> v<%= prebid.version %>\n' + dateString + '*/\n';
var port = 9999;
const FAKE_SERVER_HOST = argv.host ? argv.host : 'localhost';
const FAKE_SERVER_PORT = 4444;
Expand Down Expand Up @@ -134,6 +134,12 @@ function watch(done) {
done();
};

function makeModuleList(modules) {
return modules.map(module => {
return '"' + module + '"'
});
}

function makeDevpackPkg() {
var cloned = _.cloneDeep(webpackConfig);
cloned.devtool = 'source-map';
Expand All @@ -145,6 +151,7 @@ function makeDevpackPkg() {
return gulp.src([].concat(moduleSources, analyticsSources, 'src/prebid.js'))
.pipe(helpers.nameModules(externalModules))
.pipe(webpackStream(cloned, webpack))
.pipe(replace(/('|")v\$prebid\.modulesList\$('|")/g, makeModuleList(externalModules)))
.pipe(gulp.dest('build/dev'))
.pipe(connect.reload());
}
Expand All @@ -157,13 +164,13 @@ function makeWebpackPkg() {

const analyticsSources = helpers.getAnalyticsSources();
const moduleSources = helpers.getModulePaths(externalModules);
const modulesString = getModulesListToAddInBanner(externalModules);

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, modules: modulesString })))
.pipe(replace(/('|")v\$prebid\.modulesList\$('|")/g, makeModuleList(externalModules)))
.pipe(gulpif(file => file.basename === 'prebid-core.js', header(banner, { prebid: prebid})))
.pipe(gulp.dest('build/dist'));
}

Expand Down
30 changes: 3 additions & 27 deletions integrationExamples/gpt/haloRtdProvider_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@
googletag.pubads().disableInitialLoad();
});

var appnexusSegmentHandler = function(bid, segments) {
if (!bid.params) {
bid.params = {};
}
if (!bid.params.user) {
bid.params.user = {};
}

if (!Array.isArray(bid.params.user.segments)) {
bid.params.user.segments = [];
}

var appnexusSegments = [];
for (var i = 0; i < segments.length; i++) {
var segment = segments[i];
let appnexusSegment = {'id': segment.id, 'value': segment.value};
appnexusSegments.push(appnexusSegment);
}
bid.params.user.segments = bid.params.user.segments.concat(appnexusSegments);
};

pbjs.que.push(function() {
pbjs.setConfig({
debug: true,
Expand All @@ -71,9 +50,6 @@
name: "halo",
waitForIt: true,
params: {
mapSegments: {
appnexus: appnexusSegmentHandler // pass true to use the builtin handler. here, we will demo overriding the handler with a function
},
segmentCache: false,
requestParams: {
publisherId: 0
Expand All @@ -89,7 +65,7 @@
});

function sendAdserverRequest() {
document.getElementById('audigent_segments').innerHTML = JSON.stringify(adUnits[0].bids[0].params.user.segments);
document.getElementById('audigent_segments').innerHTML = window.localStorage.getItem('auHaloRtd');
document.getElementById('halo_id').innerHTML = testHaloId;

if (pbjs.adserverRequestSent) return;
Expand Down Expand Up @@ -130,7 +106,7 @@
</head>

<body>
<h2>Audigent Segments Prebid</h2>
<h2>Halo RTD Prebid</h2>

<div id='test-div'>
<script>
Expand All @@ -142,7 +118,7 @@ <h2>Audigent Segments Prebid</h2>
<div id='halo_id'>
</div>

Audigent Segments (Appnexus):
Halo Real-Time Data:
<div id='audigent_segments'>
</div>
</body>
Expand Down
Loading

0 comments on commit e8a1add

Please sign in to comment.