Skip to content

About

A superset of Roku's BrightScript language

Resources

Stars

212 stars

Watchers

8 watching

Forks

Repository files navigation

BrighterScript

A superset of Roku's BrightScript language. Compiles to standard BrightScript.

docs build status security coverage status monthly downloads npm version license Slack

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.

Documentation

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.

BrighterScript v1 is coming

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

Quick start

npm install brighterscript --save-dev
npx bsc

From 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.

Used by


               

                TKSS Software Inc    


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

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. .bs files sit right next to .brs files, and while brsconfig.json might suit a pure BrightScript project, bsconfig.json is 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.

Accepted security advisories

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.

Changelog

See CHANGELOG.md.

Acknowledgements

  • 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.

About

A superset of Roku's BrightScript language

Resources

Stars

212 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages