Baseline app example (pipeline test)
This RSG 2.0 SDK app builds on the baseline-app to show how to customise rk build and rk dev from roku-config.ts.
Purpose
This app is a working reference for pipeline customisation. You can read roku-pipeline.ts alongside the Pipeline Extension API guide. The app is also built in continuous integration (CI) so the rk build hooks stay exercised; as a result, each hook logs what it received. The rk dev hooks, including postDeploy, run only when you deploy to a device yourself.
Summary
This example covers the following topics:
preBuildandpostBuildhooks for bothrk buildandrk dev- A
postDeployhook that runs after the app is sideloaded to a device transformManifest, including stamping a CI build number intobuild_version- Inserting custom esbuild plugins at each supported position:
"first","last", and{ before | after: <named step> } - A placeholder for a source-map upload step (it only echoes; replace it with your crash reporter's command-line tool)
If you want only a starting scaffold, you can use baseline-app and copy hooks from here as you need them.
Development
To build, test, and lint the app, run these commands:
npx rk dev # Build + deploy to Roku device (watch the [pipeline:*] log lines)
pnpm test # Run tests
pnpm run lint # Lint sourcesUpdated about 5 hours ago
Did this page help you?