A superset of Roku's BrightScript language. Compiles to standard BrightScript.
BrighterScript adds classes, namespaces, imports, enums, interfaces, type annotations and modern operators to Roku's BrightScript language, and compiles them to plain BrightScript that runs on every Roku device. Every BrightScript file is already valid BrighterScript, so projects can adopt it one file at a time.
The compiler validates entire projects, BrightScript and BrighterScript alike, and reports errors with their exact location before anything reaches a device. It powers the BrightScript Language extension for VS Code, and its plugin API lets teams add their own validations and code transforms.
The full documentation is at rokucommunity.github.io/brighterscript.
- Introduction: what BrighterScript is, with a tour of the language.
- Installation: install the compiler and run your first build.
- Configuration: set up your project's
bsconfig.json. - Plugins: extend the compiler with your own validations and code transforms.
Important
BrighterScript v1 is a complete overhaul of the compiler's core, and it's getting close to release. We'd love your help testing it before it ships.
To try it in your project:
npm install brighterscript@next- Read the v1 docs to see what's new and what's changed.
- Follow the work on the
v1branch. - Share bugs and feedback in the v1 discussion or on Slack.
npm install brighterscript --save-dev
npx bscFrom the root of a standard Roku project, that validates every file and, if there are no errors, creates ./out/project.zip. Run npx bsc --init to create a bsconfig.json, or npx bsc --help for every option.
See Installation for more examples, and the bsconfig.json reference for every config option.
BrighterScript also powers the BrightScript Language extension for VS Code and the maestro framework. Using BrighterScript in your project? Open an issue to have your logo added.
The name BrighterScript is a compliment to everything that's great about Roku's BrightScript language. Naming things is hard, and discoverability and recognizability both matter, so here's why we chose it:
- The "er" in BrighterScript represents the features added on top of BrightScript.
- It looks very similar to BrightScript, which fits, because the language is about 95% BrightScript and 5% extra (the "er" bits).
- The file extension and config file stay close to their BrightScript counterparts.
.bsfiles sit right next to.brsfiles, and whilebrsconfig.jsonmight suit a pure BrightScript project,bsconfig.jsonis close enough that you'd hardly think twice about it.
We wanted to honor BrightScript, the language BrighterScript is built on, and couldn't think of a better way than to use most of its name in ours.
Dependencies flagged by npm audit that we have reviewed and chosen not to upgrade are tracked in audit-ci.jsonc. Each entry includes the advisory ID, the date it was added, and the reason it does not apply to this project.
See CHANGELOG.md.
- Mark Pearce, for the tireless work behind the v1 rewrite. Mark is the top contributor to v1 by a wide margin, and v1 wouldn't exist without that effort.
- brs, whose fast BrightScript parser is the foundation of the BrighterScript parser.