JSPM

  • Created
  • Published
  • Downloads 2104
  • Score
    100M100P100Q116889F
  • License ISC

A formatter for BrighterScript, a superset of Roku's BrightScript language, written in JavaScript

Package Exports

  • brighterscript-formatter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (brighterscript-formatter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

brighterscript-formatter

A code formatter for BrighterScript, a superset of Roku's BrightScript language

Build Status Coverage Status npm

Usage

import { Formatter } from 'brighterscript-formatter';

//create a new instance of the formatter
var formatter = new Formatter();

//retrieve the raw BrighterScript/BrightScript file contents (probably from fs.readFile)
var unformattedFileContents = getFileAsStringSomehow();

var formattingOptions = {};
//get a formatted version of the BrighterScript/BrightScript file
var formattedFileContents = formatter.format(unformattedFileContents, formattingOptions);

Formatting Options

There are many formatting options. Rather than listing them all out here, you should look at the typescript interface.