Skip to content

An npm module for zipping and deploying to Roku devices.

Notifications You must be signed in to change notification settings

evgygor/roku-deploy

 
 

Repository files navigation

roku-deploy

Publish Roku projects to a Roku device by using Node.js.

Build Status Coverage Status NPM Version

Installation

npm install roku-deploy

Requirements

  1. Your project must be structured the way that Roku expects. This means the following folder structure:

    components/
    images/
    source/
    manifest

  2. You should create a rokudeploy.json file at the root of your project that contains all of the overrides to the default options. roku-deploy will auto-detect this file and use it when possible.

sample rokudeploy.json

{
    "host": "192.168.1.101",
    "password": "securePassword"
}

Usage

From a node script

var rokuDeploy = require('roku-deploy');

rokuDeploy({
    host: 'ip-of-roku',
    password: 'password for roku dev admin portal'
    //other options if necessary
}).then(function(){
    //it worked
}, function(){
    //it failed
});

From an npm script in package.json. (Requires rokudeploy.json to exist at the root level where this is being run)

{
    "scripts": {
        "deploy": "roku-deploy"
    }
}

Options

export interface RokuDeployOptions {
    /**
     * A full path to the folder where the zip package sould be placed
     * @default "./out"
     */
    outDir?: string;
    /**
     * The name the zip file should be given. 
     * @default "roku-deploy.zip"
     */
    outFile?: string;
    /**
     * The root path to the folder holding your project. This folder should include the manifest file.
     * @default './'
     */
    rootDir?: string;
    /**
     * An array of file paths or globs
     * @default [
            "source/**/*.*",
            "components/**/*.*",
            "images/**/*.*",
            "manifest"
        ]
     */
    files?: string[];
    /**
     * Set this to true prevent the staging folder from being deleted after creating the package
     * @default false
     */
    retainStagingFolder?: boolean;
    /**
     * The IP address or hostname of the target Roku device. 
     * @required
     * @example "192.168.1.21" 
     * 
     */
    host?: string;
    /**
     * The username for the roku box. This will almost always be 'rokudev', but allow to be passed in
     * just in case roku adds support for custom usernames in the future
     * @default "rokudev"
     */
    username?: string;
    /**
     * The password for logging in to the developer portal on the target Roku device
     * @required
     */
    password?: string;
}

About

An npm module for zipping and deploying to Roku devices.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 96.2%
  • Brightscript 3.2%
  • JavaScript 0.6%