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 --save-devThen run the compiler with npx bsc. You can also install it globally to get a bsc command everywhere:
npm install brighterscript -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, creates a zip of your app at ./out/project.zip.
To configure your build, see Configuration.
Examples
Your project's files are in a subfolder of your workspace:
bsc --root-dir ./rokuSourceFilesRebuild every time a file changes:
bsc --watchRebuild and redeploy to a Roku device every time a file changes:
bsc --watch --deploy --host 192.168.1.10 --password secret_passwordUse 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 --create-package false --copy-to-staging falseEditor 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.