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:

  • preBuild and postBuild hooks for both rk build and rk dev
  • A postDeploy hook that runs after the app is sideloaded to a device
  • transformManifest, including stamping a CI build number into build_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 sources

Did this page help you?