@truex/truex-html5-tar v1.0.0
TruexAdRenderer-HTML5 (HTML5 TAR)
Here is the full documentation on how to get up and running with the HTML5 TruexAdRenderer (TAR).
HTML5 TAR Workflow
Dependencies
Yarn: npm install -g yarn
After installing Yarn:
yarn installHTML5 TAR Development
npm startThis will launch the Webpack Dev Server @ localhost:8080 that you will be using to develop against.
HTML5 TAR Production Build
npm run prodThis will create the production build. The difference between the dev build and the production build is that the production build uses additional plugins for optimization such as UglifyJS as well as stripping out unneeded webpack specific code.
For more information, look at webpack.prod.js.
HTML5 TAR Testing
We use Jest for our unit testing. Jest gives us BDD style syntax for writing tests as well as a tooling to support continuous testing and coverage reports.
Running Tests
npm test
Continuous Testing
To have tests run automatically while you develop:
npm run watchContainer 3 Development Workflow for HTML5 CTV
Setup
- Clone the
container_corerepo. - Complete the Setup as documented in its
README.mdfile (yarn install, basically). - Get the
ad_varsfrom a working Container 3 ad, as an example, here's how to get thead_varsfrom the Kung Fu Panda Container 3 ad:- Get the
window_urlfor the ad by navigating to http://qa-get.truex.com/81551ffa2b851abc5372ab9ed9f1f58adabe5203/vast/config?network_user_id=test_html5_00002. Thewindow_urlcan be found in the top leveladsobject that's returned. - Navigate to that
window_urlin Chrome (note). Ensure your ad blocker is disabled. You should see the ad render at this point. - Open up the Chrome Dev Tools, and click on the Network tab.
- Refresh the page so that all transactions are visible.
- Still from the Network tab, filter transactions by typing
jsonin the search field at the top. This should filter down the list to theengage.jsoncall. - Click on that call. The
ad_varsis the displayed JSON blob.
- Get the
- Copy the
ad_varsinto thesrc/pwamp/src/txm_params/_desktop_ad_vars.jsfile, replacing the existingdesktopAdVarspayload. - Run
npm startto build Container 3 and run the local web server.
Development and Testing
- Navigate to
localhost:8080/desktop.html, the Kung Fu Panda ad configured in Setup should render, but this time based on your local Container 3 code base. - You're now able to make changes to the code base, which are reloaded on the fly.
Choice Card Development Workflow
Setup
- Clone the
integration_corerepo. - Complete the Setup as documented in its
README.mdfile (brew install grunt,npm install). - Start the
integration_coredev server:grunt server. - Verify that the dev server is up and can serve up the Choice Card JS by browsing to:
http://localhost:8001/fw_renderers/choicecard-tv-tar.js. - Back in the current repo (
TruexAdRenderer-HTML5), editsrc/desktop/desktop.jsto load your local version of the Choice Card by changing the URL loaded bygetScripttohttp://localhost:8001/fw_renderers/choicecard-tv-tar.js. - Run
npm startto build theTruexAdRenderer-HTML5repo and run the local web server.
Development and Testing
- Navigate to
localhost:8080/desktop.html, the Choice Card should render, but this time based on your localintegration_corecode base. - You're now able to make changes to the
choicecard-tv-tar.jscode base, which are reloaded on the fly. - The
TruexAdRenderer-HTML5includes a hard codedvast_configwhich includes the Choice Card configuration. This can be found insrc/hulu_ctv/tx_initialize_hulu_ctv.js. Edit this file to test changes to the card configuration.
6 years ago