Join the weekly newsletter
By Arturo Cuya
@arturo__cuyaEvery developer needs an easy way to spin up a new project.
I was made aware of this problem when I decided to start a blog.
I’d need to be able to create a bunch of small projects if I wanted to showcase isolated features from Roku — or test the libraries that the community puts out.
For Roku developers, this is hard.
Either you remember the correct file structure and manifest configuration, or you download the sample Hello World project from the docs.
The latter option assumes that the sample project meets my expectations of a good initial structure — and assumes that Roku will keep that sample updated and accessible forever.
Don’t get me wrong, I love developing Roku applications. But I wouldn’t put a lot of faith in their maintainability capacities.
So for a long time I went with first option: Remembering the standard structure I like and applying it to each new project.
Being the lazy automation-first programmer that I am, not so long ago I figured:
Huh, it would be nice if the Roku development scene had a tool like create-react-app
, to quickly scaffold a new project.
And that’s how I came up with create-roku-app
.
create-roku-app
To use my CLI tool, you need to have Node and NPM (>=5.2.0) installed.
It’s also recommended that you have Git installed of course.
Finally, the tool assumes that your preferred code editor is Visual Studio Code — which should be the case if you’re a Roku developer.
Simply run
npx create-roku-app --name "My Roku App"
There’s also a --recommended
configuration, which automatically chooses the options that I like when working with Roku projects:
bslint
and brighterscript-formatter
for code stylingMy personal go-to is:
npx create-roku-app --name "My Roku App" --recommended --pm pnpm
The --pm
flag will let you decide which Node package manager to use.
The default is npm
, but I like pnpm
because it’s faster and consumes less disk space.
There’s also yarn
for people trapped still trapped in the last decade :)
If you always work with the same device, go ahead and add its credentials to bsconfig.json
Remember to set the channel poster images on the manifest
file
I hope you enjoy using this tool as much as I enjoyed making it.
For absolute beginners, this course is meant to set you in the right path to make use of modern tools and best practices from day one. Subscribe to the newsletter to get notified when it's available.
Use these tools to 10x your workflows. Free and open source forever.