Installation
Install the compiler
Install BrighterScript as a dev dependency of your project, so everyone on the team (and your CI) builds with the same version:
npm install brighterscript@next --save-devv1 is published under the next tag on npm until it's released. Then run the compiler with npx bsc. You can also install it globally to get a bsc command everywhere:
npm install brighterscript@next -gYour first build
If your project's files are laid out the way Roku expects (manifest, source/, components/ and so on), run this from the root of your project:
npx bscThat's it. The compiler finds every file in your project, checks it for syntax and validation errors, and if there are none, writes the transpiled app to the ./out folder.
To configure your build, see Configuration.
Examples
Your project's files are in a subfolder of your workspace:
bsc --rootDir ./rokuSourceFilesRebuild every time a file changes:
bsc --watchUse a bsconfig.json that isn't in the current directory:
bsc --project ./some_folder/bsconfig.jsonOnly check for errors, like a linter (works with --watch too):
bsc --noEmitEditor support
Install the BrightScript Language extension for VS Code. It runs this compiler as you type, so you see errors immediately and get completions, hover info and go-to-definition. See Language Server to tune it.
For a linter with more rules, see bslint.