{"_id":"reach-prebid-universal-creative","_rev":"5-33f5b289aaf724c77372b0eaddf58125","name":"reach-prebid-universal-creative","dist-tags":{"latest":"1.17.2"},"versions":{"1.3.1-pre":{"name":"reach-prebid-universal-creative","version":"1.3.1-pre","keywords":["Prebid.js"],"author":{"name":"Prebid.org Contributors"},"license":"Apache-2.0","_id":"reach-prebid-universal-creative@1.3.1-pre","maintainers":[{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"}],"homepage":"https://github.com/prebid/prebid-universal-creative#readme","bugs":{"url":"https://github.com/prebid/prebid-universal-creative/issues"},"dist":{"shasum":"224dc9cdebb62907c6eb70846636315013dda1c8","tarball":"https://registry.npmjs.org/reach-prebid-universal-creative/-/reach-prebid-universal-creative-1.3.1-pre.tgz","fileCount":56,"integrity":"sha512-Z5IdU80TUhyBAvJxQkJeiE23Ll4UsqWxwrvrb53e11YY6iv/ZEUM0rIFzWei95wYOohtyw867O0lP6G9s4LuAQ==","signatures":[{"sig":"MEUCIEJDucwUFNAXu//BJXmtyhp/S4k663TYfIGERHHBU8eUAiEA1D/O99ZsNTPNZ4h/1TUXy5wPcRV4uzBXOmNlVKLj5vg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5rWvCRA9TVsSAnZWagAAWtgP+wU+3YYeJnZUGT5DdNo1\ng4R/IHa3y/3bJSLwGF30h74m2ZVKDA8qmk916j8JknXfO7e5/K6s5VKZ6kdV\nGMczgHO9yQvNq8xOy8rH61AkeAC4HAaT4tBWSWs3aI+wq9m5gTplp1ilbB29\nkj1faOdlH0SLPuse+FI+IfLlk0K/JtsiLnkDp244MAOSIQOXsvDwMxSAqMzU\nSvXS5tEGG37Imb0ngRpLNIUu/vGmM3drrU4Nap0rbd039V3VOydiuqz8z42+\nyFqPoEC+AQU2sCY5iReTymHQP/YmIgGsi1UJnNfRCyTCBhoHuu0Cg7wrtVDR\nZyrc6QjiHQrC6uFdeWVdQUpi8rEIIZ20Dwg1cFVx9CpjZQiygYTzkGFQgprx\nBP3kafu5lzYo4KveTYqQZIalqRuVNcAJN2RhWd0kXbbBHqumrOLki6Y5dGYJ\nVjLNPgffRJJ48BFiQKPZspejk5vasv9pmuv2H8OLIfJau3Gnk6GBlaaeZYib\n94lpwqqq78cRhZtRNP3b0Q5m+v8bFLnge2w74YrU7lyiW2T/6Rgu3XZhc5wr\nykxdUnSaCABQqERLTfhcOAloUSrkTferL7ApMFweQJsaW7QxU4iAxoKXVYt9\noJpJ0UD9uFyxibSqsKs3RyxaGQOhFo/zzn8eRv5GSGrAVaiTnXV7Oj9JLhgv\nq9OE\r\n=SnK3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/creative.js","engines":{"node":"<=8.1.2"},"gitHead":"89f0679e07daa7b221e5ee4f3efd8ca680830938","scripts":{"test":"echo test","prepublish":"gulp build"},"_npmUser":{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"},"repository":{"url":"git+https://github.com/prebid/prebid-universal-creative.git","type":"git"},"_npmVersion":"6.4.1","description":"Universal creative for Prebid apps","directories":{},"_nodeVersion":"10.13.0","dependencies":{"postscribe":"^2.0.8","babel-plugin-transform-object-assign":"^6.22.0"},"globalVarName":"pbjs_reach","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","gulp":"^3.9.1","open":"0.0.5","execa":"^1.0.0","karma":"^3.0.0","mocha":"^5.2.0","sinon":"^6.3.4","yargs":"^11.0.0","lodash":"^4.17.11","webpack":"^3.0.0","babel-core":"^6.26.0","gulp-clean":"^0.4.0","karma-chai":"^0.1.0","gulp-eslint":"^4.0.2","gulp-header":"^2.0.1","gulp-inject":"^5.0.2","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","karma-mocha":"^1.3.0","karma-sinon":"^1.0.5","webdriverio":"^4.13.2","babel-loader":"^7.1.2","gulp-replace":"^0.6.1","karma-webpack":"^3.0.5","gulp-webserver":"^0.9.1","karma-coverage":"^1.1.2","webpack-stream":"^4.0.0","babel-preset-env":"^1.6.1","wdio-spec-reporter":"^0.1.5","karma-spec-reporter":"^0.0.31","karma-mocha-reporter":"^2.2.5","wdio-mocha-framework":"^0.6.3","babel-plugin-istanbul":"^5.0.1","karma-chrome-launcher":"^2.2.0","wdio-concise-reporter":"^0.1.2","karma-sourcemap-loader":"^0.3.7","wdio-browserstack-service":"^0.1.17","karma-browserstack-launcher":"^1.3.0","string-replace-webpack-plugin":"^0.1.3","babel-plugin-transform-es3-property-literals":"^6.22.0","babel-plugin-transform-es3-member-expression-literals":"^6.22.0"},"_npmOperationalInternal":{"tmp":"tmp/reach-prebid-universal-creative_1.3.1-pre_1558623663021_0.8888948327841575","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"reach-prebid-universal-creative","version":"1.3.2","keywords":["Prebid.js"],"author":{"name":"Prebid.org Contributors"},"license":"Apache-2.0","_id":"reach-prebid-universal-creative@1.3.2","maintainers":[{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"}],"homepage":"https://github.com/prebid/prebid-universal-creative#readme","bugs":{"url":"https://github.com/prebid/prebid-universal-creative/issues"},"dist":{"shasum":"a1e6a42a22ca18ee012b6a5ea8ba345189b437ec","tarball":"https://registry.npmjs.org/reach-prebid-universal-creative/-/reach-prebid-universal-creative-1.3.2.tgz","fileCount":58,"integrity":"sha512-QMopsnXGfInUmOht3jIPbMP/Jzfx01dqTqTVf0w+d0GLK1ZL2giR9EUeJqbFuqLuHxWCs5BCKoPQgwf8cbakLQ==","signatures":[{"sig":"MEQCIA58U0lgWDaTue3Fj3Fgs38EC7esHOC0TNuXKbW6FHiQAiB3B/tUhDpUYvH0khcbSIKQmqiDmB2du0oJitTuE6Ni8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6AcaCRA9TVsSAnZWagAA93oP/1T7Z/s7BRYgpKsloWhc\nCR7lCaaDjyf/EATP8Mlzw1DRn2zrr/6vZmB3iWWsURZkmCDmUHZWTc+Rhq57\nwbXJkTgkAo/7hwhIHF2UTHl85iFBPsNv4UZVpMEDNwcAWWsFzGUoCAtRkzf7\na1CFHUWB1abw9GHK35l84gx7+zipPZYVsH6NvSnqn9ZcCNog3SPuIyBAdsWw\nQrqd5/D8j3vm+D3Gr/Pd5S5afJAek+9McH6BlSnR8NVIztmKuAAH1vqL26oi\nGkIqyBrJtbcI9FKk4qjOL8f/2ruOdBfRCfJpL/NRT+FTL3jtxNUSIzI/4j/z\nA+4P+6LX9JOc7aiHfQjH6TsSLbmgL8wFQ3ejpTTGRzG3kofH1a1F9KWdXHF4\np3V5hoxfWLORgwarmEh0FJRoRBPkCiY/myftz/+CfDcWdUVe/STJwazI9VCJ\nQ5u4IICjYgtSfUvBwY52D/THjkyD/tb96WasiOXTMZfoLCkSG+8I5CL6BwT/\nLX5kg8M6CZvoGBngR/8PWRTBsNFkuVknly+SnVHGQOTAbyI9oICD2jx+rRC9\n5Z8sflLBCWqRh6bHiLZEp3Ef5cR5uug3U0JrOtEUucN8rPzYKgq6gzuv+WDV\nut5rHCdjKDSmBwTlsL2bK8ToMJ3xEMzoqqGaXjuvA4+vq/8o5RhYgqo1xIaV\nk3Ix\r\n=l4sO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/creative.js","engines":{"node":"<=8.1.2"},"gitHead":"89f0679e07daa7b221e5ee4f3efd8ca680830938","scripts":{"test":"echo test","prepublish":"gulp build"},"_npmUser":{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"},"repository":{"url":"git+https://github.com/prebid/prebid-universal-creative.git","type":"git"},"_npmVersion":"6.4.1","description":"Universal creative for Prebid apps","directories":{},"_nodeVersion":"10.13.0","dependencies":{"postscribe":"^2.0.8","babel-plugin-transform-object-assign":"^6.22.0"},"globalVarName":"pbjs_reach","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","gulp":"^3.9.1","open":"0.0.5","execa":"^1.0.0","karma":"^3.0.0","mocha":"^5.2.0","sinon":"^6.3.4","yargs":"^11.0.0","lodash":"^4.17.11","webpack":"^3.0.0","babel-core":"^6.26.0","gulp-clean":"^0.4.0","karma-chai":"^0.1.0","gulp-eslint":"^4.0.2","gulp-header":"^2.0.1","gulp-inject":"^5.0.2","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","karma-mocha":"^1.3.0","karma-sinon":"^1.0.5","webdriverio":"^4.13.2","babel-loader":"^7.1.2","gulp-replace":"^0.6.1","karma-webpack":"^3.0.5","gulp-webserver":"^0.9.1","karma-coverage":"^1.1.2","webpack-stream":"^4.0.0","babel-preset-env":"^1.6.1","wdio-spec-reporter":"^0.1.5","karma-spec-reporter":"^0.0.31","karma-mocha-reporter":"^2.2.5","wdio-mocha-framework":"^0.6.3","babel-plugin-istanbul":"^5.0.1","karma-chrome-launcher":"^2.2.0","wdio-concise-reporter":"^0.1.2","karma-sourcemap-loader":"^0.3.7","wdio-browserstack-service":"^0.1.17","karma-browserstack-launcher":"^1.3.0","string-replace-webpack-plugin":"^0.1.3","babel-plugin-transform-es3-property-literals":"^6.22.0","babel-plugin-transform-es3-member-expression-literals":"^6.22.0"},"_npmOperationalInternal":{"tmp":"tmp/reach-prebid-universal-creative_1.3.2_1558710041935_0.627091004395369","host":"s3://npm-registry-packages"}},"1.3.3":{"name":"reach-prebid-universal-creative","version":"1.3.3","keywords":["Prebid.js"],"author":{"name":"Prebid.org Contributors"},"license":"Apache-2.0","_id":"reach-prebid-universal-creative@1.3.3","maintainers":[{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"}],"homepage":"https://github.com/prebid/prebid-universal-creative#readme","bugs":{"url":"https://github.com/prebid/prebid-universal-creative/issues"},"dist":{"shasum":"8b454f569d759d21d4ba57cc5228f5e54e4ca47a","tarball":"https://registry.npmjs.org/reach-prebid-universal-creative/-/reach-prebid-universal-creative-1.3.3.tgz","fileCount":58,"integrity":"sha512-NDDjoo66s5WJcrybJuYuzWJisBQUwY4ElwAchjOWEB3Fh+V79nIdl/YHIzaHj1oTpYvGGUdgGgndUY2yT0unkg==","signatures":[{"sig":"MEUCIQD2OAzTq0fw8wjku7lbKg3OSkLpqJyzuhtsnwTy5zrergIgHjAjP6V5gkUgAo6hU5gmH4dO3eqbe4qiM1pV3gV1vs8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc6Al9CRA9TVsSAnZWagAAV14P/jGWoBPkZkN3k/wiVqKi\nHUGJo1ZJiu4KkJba40aaUevrsShzrmLyQF3BmI3+2FC4FkxMr0NTAeboLDOp\n58N+NAuImrchWh8HmDWQI0JN731nPZww8CH7KGe7TF4c01r5CxHknLu9mPm5\nK8c4TEL1HF67lEkY0dgfbUCDKegooCI6NTuohimB7rzUjHCQrNwjbgmmLqqd\nRnHsetWA1ZT5Syc0+Js75SztCjum/ZjnImFi/X+V00TFlv9+NSjCaPqPG6kT\nzCHxfkP/eE49Ys7dYIZHDSl0ppqiBjg60p267Mggg5PegB9TSmBbAQcfDQBC\n7bE4a/2jb14wwMiQvn60F1fECSk6/Ah/5WxWe7y2CTJvvdQJld0i6fklS/bU\nudW9aNQp3/4csl9ekSolDOCplI7iaoBqAMTCHVhcg2P/0Q9WNxJ2O87ZPK7p\n/GUOjk8JdCqrSPHM0cQgldNM6K1XMJtxqT2jaDrrz2wNCM60GUBqVHe55+sL\nwCFWy4b4yzxuh2ELPYF449GE344xFuVCgU5/REH/3nSpzDOBLKnRR7Z8nCtg\nQDJnU4JMylKcHQ7z84XEly/BbCKUSMHlwpoWBCE8tfIqCmUQ/UtaZz/YXLuO\n4mOj0enkHCfDqBvdq0lWE5f/MPcQocfRHr/NpuyptwfnhMJj8Yh5kbmINEp3\nbUZZ\r\n=Tfi4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/creative.js","engines":{"node":"<=8.1.2"},"gitHead":"acc8c8e8630e323c8cc2a583d48cce114aee041f","scripts":{"test":"echo test","prepublish":"gulp build"},"_npmUser":{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"},"repository":{"url":"git+https://github.com/prebid/prebid-universal-creative.git","type":"git"},"_npmVersion":"6.4.1","description":"Universal creative for Prebid apps","directories":{},"_nodeVersion":"10.13.0","dependencies":{"postscribe":"^2.0.8","babel-plugin-transform-object-assign":"^6.22.0"},"globalVarName":"pbjs_reach","_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","gulp":"^3.9.1","open":"0.0.5","execa":"^1.0.0","karma":"^3.0.0","mocha":"^5.2.0","sinon":"^6.3.4","yargs":"^11.0.0","lodash":"^4.17.11","webpack":"^3.0.0","babel-core":"^6.26.0","gulp-clean":"^0.4.0","karma-chai":"^0.1.0","gulp-eslint":"^4.0.2","gulp-header":"^2.0.1","gulp-inject":"^5.0.2","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0","karma-mocha":"^1.3.0","karma-sinon":"^1.0.5","webdriverio":"^4.13.2","babel-loader":"^7.1.2","gulp-replace":"^0.6.1","karma-webpack":"^3.0.5","gulp-webserver":"^0.9.1","karma-coverage":"^1.1.2","webpack-stream":"^4.0.0","babel-preset-env":"^1.6.1","wdio-spec-reporter":"^0.1.5","karma-spec-reporter":"^0.0.31","karma-mocha-reporter":"^2.2.5","wdio-mocha-framework":"^0.6.3","babel-plugin-istanbul":"^5.0.1","karma-chrome-launcher":"^2.2.0","wdio-concise-reporter":"^0.1.2","karma-sourcemap-loader":"^0.3.7","wdio-browserstack-service":"^0.1.17","karma-browserstack-launcher":"^1.3.0","string-replace-webpack-plugin":"^0.1.3","babel-plugin-transform-es3-property-literals":"^6.22.0","babel-plugin-transform-es3-member-expression-literals":"^6.22.0"},"_npmOperationalInternal":{"tmp":"tmp/reach-prebid-universal-creative_1.3.3_1558710652592_0.15273460069497946","host":"s3://npm-registry-packages"}},"1.17.2":{"name":"reach-prebid-universal-creative","version":"1.17.2","description":"Universal creative for Prebid apps","main":"dist/creative.js","scripts":{"test":"gulp test","prepublish":"gulp build"},"keywords":[],"globalVarName":"pbjs_reach","license":"Apache-2.0","devDependencies":{"@babel/core":"^7.2.2","@babel/plugin-transform-modules-commonjs":"^7.6.0","@babel/preset-env":"^7.2.3","@babel/register":"^7.6.2","@playwright/test":"^1.50.1","babel-loader":"^8.0.5","babel-plugin-transform-es3-member-expression-literals":"^6.22.0","babel-plugin-transform-es3-property-literals":"^6.22.0","chai":"^4.1.2","core-js":"^3.13.0","core-js-pure":"^3.13.0","del":"^5.0.0","execa":"^1.0.0","gulp":"^5.0.0","gulp-clean":"^0.4.0","gulp-connect":"^5.7.0","gulp-eslint":"^4.0.2","gulp-header":"^2.0.1","gulp-inject":"^5.0.2","gulp-rename":"^1.2.2","gulp-replace":"^0.6.1","gulp-uglify":"^3.0.0","istanbul":"^0.4.5","istanbul-instrumenter-loader":"^3.0.0","karma":"^6.4.0","karma-browserstack-launcher":"^1.3.0","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.2","karma-coverage-istanbul-reporter":"^1.4.3","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"^0.0.31","karma-webpack":"^3.0.5","lodash":"^4.17.14","mocha":"^10.2.0","opn":"^6.0.0","sinon":"^6.3.4","string-replace-webpack-plugin":"^0.1.3","webdriverio":"^9.10.0","webpack":"^3.12.0","webpack-common-shake":"^1.0.0","webpack-stream":"^4.0.0","yargs":"^11.0.0"},"dependencies":{"babel-plugin-transform-object-assign":"^6.22.0","postscribe":"^2.0.8","gulp-cli":"^3.0.0"},"gitHead":"7adbb157e8c4f9cff9de7cd4ba6a42af25f674f7","_id":"reach-prebid-universal-creative@1.17.2","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-CwcalT9xE9r+yQarl7c3EUeN9RXJ66YDMfFpssKpQkx/WXQUaiOnCqNPYWlb25fiyyJ8JDzgC9RzNcsPeOT4Bw==","shasum":"a19664453394045b41dfdfbd7aa49302626c7cd3","tarball":"https://registry.npmjs.org/reach-prebid-universal-creative/-/reach-prebid-universal-creative-1.17.2.tgz","fileCount":16,"unpackedSize":263956,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCmWDVjl6PvMc4FZtloJ6gyq8Cv0IUwAJ2QJxZr5X8q6AIgPttPcECpwr9BvTRirk61KDR0Noi18KQq4WTYZR58GYE="}]},"_npmUser":{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"},"directories":{},"maintainers":[{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reach-prebid-universal-creative_1.17.2_1753449682685_0.29114226902283846"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-23T15:01:03.019Z","modified":"2025-07-25T13:21:23.083Z","1.3.1-pre":"2019-05-23T15:01:03.153Z","1.3.2":"2019-05-24T15:00:42.081Z","1.3.3":"2019-05-24T15:10:52.774Z","1.17.2":"2025-07-25T13:21:22.907Z"},"license":"Apache-2.0","keywords":[],"description":"Universal creative for Prebid apps","maintainers":[{"name":"trinitymirrordigital-admin","email":"stuart.campbell@trinitymirror.com"}],"readme":"# Prebid Universal Creative\n\nPrebid Universal Creative is a javascript api to render multiple formats. This file is inserted into the prebid creative as a placeholder for the winning prebid creative. It should support the following formats:\n - Banner\n - Outstream Video\n - Mobile\n - AMP creatives\n - All safeFrame creatives\n \n## Usage\n\nYou can find a detailed explanations on the [Prebid Universal Creative](https://docs.prebid.org/overview/prebid-universal-creative.html) and [AdOps - Add Creative](https://docs.prebid.org/adops/setting-up-prebid-with-the-appnexus-ad-server.html#step-3-add-creatives) pages.\n\n> **important:** If you’re using the `Send All Bids` scenario (where every bidder has a separate order), the creative and targeting will be different from the example shown here. See [Send All Bids](https://docs.prebid.org/adops/send-all-vs-top-price.html#send-all-bids) for details.\n\n```html\n<script src = \"https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/%%PATTERN:hb_format%%.js\"></script>\n<script>\n  var ucTagData = {};\n  ucTagData.adServerDomain = \"\";\n  ucTagData.pubUrl = \"%%PATTERN:url%%\";\n  ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;\n  ucTagData.hbPb = \"%%PATTERN:hb_pb%%\";\n  ucTagData.hbFormat = \"%%PATTERN:hb_format%%\";\n  ucTagData.adId = \"%%PATTERN:hb_adid%%\";\n  // if you're using GAM and want to track outbound clicks on native ads you can add this line\n  ucTagData.clickUrlUnesc = \"%%CLICK_URL_UNESC%%\";\n  ucTagData.requestAllAssets = true;\n\n  try {\n    ucTag.renderAd(document, ucTagData);\n  } catch (e) {\n    console.log(e);\n  }\n</script>\n```\n\nCreative created like described above will work for all formats:\n- amp\n- banner\n- mobile\n- native\n- video (outstream video)\n\nWhich means that the same creative code can be reused on all formats.  \nUniversal creative library is loaded with `%%PATTERN:hb_format%%.js` path. Which means for each `hb_format` targeting key-value, separate `.js` library will be loaded.\n\n> Note: Some build tools make explicit use of Node features which have been introduced in version *8.9.0*. Please make sure you're using the correct Node version (>8.9.0) before you proceed to create your own build using the commands listed below.\n\n## Install\n\n    $ git clone https://github.com/prebid/prebid-universal-creative.git\n    $ cd prebid-universal-creative\n    $ npm install\n\n*Note:* You need to have `NodeJS` 8.9.x or greater installed.\n\n*Note:* We have upgraded from Gulp v3.9.1 to Gulp v4.0.2. In accordance with the change, you need to have `gulp-cli` installed globally. This won't impact any other project using `gulp`.\n\nIf you have a version of `gulp` installed globally, you may need to uninstall it to continue. You can run `gulp -v` and check the version of the `CLI` field to see if it's installed. If the major version is `2`, you already have `gulp-cli` installed and can run `gulp` commands. If the `CLI` version is same as the `Local` version, you need to uninstall `gulp` globally.\n\nTo uninstall the old package globally, run the command: `npm uninstall -g gulp`. <br />\nTo install `gulp-cli` globally, run the command: `npm install -g gulp-cli`.\n\nRun `gulp -v` just to make sure that the `CLI` major version is `2`. You're now good to run `gulp` commands.\n\n## Build for development\n\n    $ gulp serve\n\nStarts a web server at `http://localhost:9999` serving from the project root and generates the following files:\n\n+ `./build/creative.js` - Full source code for dev and debug\n+ `./build/creative.js.map` - Source map for dev and debug\n\n## Build for production\n\nWe publish `prebid-universal-creative` as npm package on npmjs.com\n\nWhen we run `npm publish`, prepublish script of package.json is executed. Scripts given in prepublish Run BEFORE the package is packed and published. See https://docs.npmjs.com/misc/scripts\n\n`gulp build` is executed before publish. It creates two files in dist directory\n\n+ `./dist/amp.js` - Minified amp.js source code (responsible for rendering amp ads)\n+ `./dist/banner.js` - Minified banner.js source code (responsible for rendering banner ads)\n+ `./dist/mobile.js` - Minified mobile.js source code (responsible for rendering mobile ads)\n+ `./dist/native.js` - Minified native.js source code (responsible for rendering native ads)\n+ `./dist/video.js` - Minified video.js source code (responsible for rendering outstream video ads)\n\n[jsDelivr](https://www.jsdelivr.com/) – Open Source CDN is used to serve creative.js file.\n\n## Test\n\nWe like to test a lot before releasing newer versions. \n\n   ```\n   gulp test // Run unit tests in your local environment\n   ```\n\n   Set the environment variables. You may want to add these to your `~/.bashrc` for convenience.\n\n   ```\n   export BROWSERSTACK_USERNAME=\"my browserstack username\"\n   export BROWSERSTACK_ACCESS_KEY=\"my browserstack access key\"\n   ```\n   \n   ```\n   gulp test --browserstack\n   ```\n\n   For End to End testing, \n   - Set `test.localhost` in your hosts file. \n   \n   ```\n   gulp e2e-test\n   ``` \n\n   Reason to add specific host to your host file is\n   - To test against your local build, we had to give local path in dfp creative. Redirecting request is not possible in browserstack.\n   - On localhost domain you do not receive bid from certain SSP's, hence you have to have some host defined in hosts file. As of now we are using `test.localhost` defined in local host file as well as `DFP creative`.\n## Contributing\n\nFound a bug? Great!\nThis project is in its infancy, and many things can be improved.\n\nReport bugs, request features, and suggest improvements [on Github](https://github.com/prebid/prebid-universal-creative/issues).\n\nOr better yet, [open a pull request](https://github.com/prebid/prebid-universal-creative/compare) with the changes you'd like to see.\n\n","readmeFilename":"README.md"}