- Install
yarn - Clone
git clone git@github.com:GannettDigital/Prebid.js.git cd Prebid.js - Run build command
make build
Compiled script will be built to build/dist/prebid.js
If you have access to the ads-gci-www-gannett-cdn-com Google Cloud bucket and have gcloud installed, you can automatically build and upload to the CDN in one step using make sync. This also builds and uploads a dev (unminified) version.
Details on steps run during this process can be found below in Build Details.
Add module name to modules.json. Change must be committed before running build command.
- Ensure desired version exists in current tags:
git tag -l | grep "my-desired-version"- If your version is not listed, fetch upstream tags:
git remote add upstream git@github.com:prebid/Prebid.js.gitgit fetch upstream- Ensure version is now listed in
git tag -l
- Update version number in
gannett-version.txt
git remote add upstream git@github.com:prebid/Prebid.js.git
git checkout [-b] my-update-branch
git fetch upstream --prune
git rebase -i upstream/master my-update-branchWho knows, you might not even have any merge conflicts! 🤞
What happens when I run make build/make sync?
- Checkout appropriate version based on contents of gannett-version.txt
git checkout tags/$(<gannett-version.txt) - Checkout
modules.jsonfrommastersince it won't exist at the taggit checkout master -- modules.json
- Run gulp build command
gulp build --modules=modules.json
- (
make-synconly) Upload production file to CDNgsutil cp ./build/dist/prebid.js gs://ads-gci-www-gannett-cdn-com/vendor/pbjsandwich.min.js
- (
make-synconly) Build dev filegulp build-bundle-dev --modules=modules.json
- (
make-synconly) Upload dev file to CDNgsutil cp build/dev/prebid.js gs://ads-gci-www-gannett-cdn-com/vendor/pbjsandwich.js