![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
roku-deploy
Advanced tools
Publish Roku projects to a Roku device by using Node.js.
npm install roku-deploy
Your project must be structured the way that Roku expects. The source files can be in a subdirectory (using the rootDir
config option), but whever your roku files exist, they must align with the following folder structure:
components/
images/
source/
manifest
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"
}
From a node script
var rokuDeploy = require('roku-deploy');
rokuDeploy.deploy({
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"
}
}
Here are the available options. The defaults are shown to the right of the option name, but all can be overridden:
host: string (required)
The IP address or hostname of the target Roku device. Example: "192.168.1.21"
password: string (required)
The password for logging in to the developer portal on the target Roku device
outDir?: string = "./out"
A full path to the folder where the zip package should be placed
outFile?: string = "roku-deploy.zip"
The name the zip file should be given.
rootDir?: string = './'
The root path to the folder holding your project. The manifest file should be directly underneath this folder. Use this option when your roku project is in a subdirectory of where roku-deploy is installed.
files?: ( string | { src: string; dest: string; } ) [] =
[
"source/**/*.*",
"components/**/*.*",
"images/**/*.*",
"manifest"
]
An array of file paths, globs, or {src:string;dest:string} objects that will be copied into the deployment package.
Using the {src;dest} objects will allow you to move files into different destination paths in the
deployment package. This would be useful for copying environment-specific configs into a common config location
(i.e. copy from "ProjectRoot\configs\dev.config.json"
to "roku-deploy.zip\config.json"
). Here's a sample:
//deploy configs/dev.config.json as config.json
{
"src": "configs/dev.config.json",
"dest": "config.json"
}
//you can omit the filename in dest if you want the file to keep its name. Just end dest with a trailing slash.
{
"src": "languages/english/language.xml",
"dest": "languages/"
}
This will result in the [sourceFolder]/configs/dev.config.json
file being copied to the zip file and named "config.json"
.
You can also provide negated globs (thanks to glob-all). So something like this would include all component files EXCEPT for specs.
files: [
'components/**/*.*',
'!components/**/*.spec.*'
]
NOTE: If you override this "files" property, you need to provide all config values, as your array will completely overwrite the default.
retainStagingFolder?: boolean = false
Set this to true prevent the staging folder from being deleted after creating the package. This is helpful for troubleshooting why your package isn't being created the way you expected.
username?: string = "rokudev"
The username for the roku box. This will always be 'rokudev', but allow to be passed in
just in case roku adds support for custom usernames in the future
Click here to see the typescript interface for these options
2.0.0-beta5 - 2019-01-18
normalizeFilesOption
to be sync instead of async, since it didn't need to be async.FAQs
Package and publish a Roku application using Node.js
The npm package roku-deploy receives a total of 5,863 weekly downloads. As such, roku-deploy popularity was classified as popular.
We found that roku-deploy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.