npm init and modify app.mk to use local packages instead of global.
This commit is contained in:
parent
528deec6b8
commit
e81de5fee4
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,6 +7,9 @@ source/globals.brs
|
||||||
dist/apps
|
dist/apps
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
#NPM modules
|
||||||
|
node_modules/
|
||||||
|
|
||||||
#Rooibos generated
|
#Rooibos generated
|
||||||
rooibosFunctionMap.brs
|
rooibosFunctionMap.brs
|
||||||
*/buildinfo.brs
|
*/buildinfo.brs
|
||||||
|
|
63
DEVGUIDE.md
Normal file
63
DEVGUIDE.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# JellyFin Roku Development
|
||||||
|
###### The Ramblings of a Learning Man
|
||||||
|
|
||||||
|
#### The GIT Portion
|
||||||
|
1. Install git
|
||||||
|
2. Fork [jellyfin-roku](https://github.com/jellyfin/jellyfin-roku) repo to your own.
|
||||||
|
3. Clone your repo to local
|
||||||
|
3a. ````git clone ssh://github.com/username/jellyfin-roku.git````
|
||||||
|
4. Create a branch for your fix
|
||||||
|
4a. ````git checkout -B issue007````
|
||||||
|
5. Set remote repo so you can stay current with other dev changes
|
||||||
|
5a. ````git remote add upstream https://github.com/jellyfin/jellyfin-roku.git````
|
||||||
|
6. Fetch remote changes from other devs often
|
||||||
|
6a. ````git fetch upstream````
|
||||||
|
7. After making changes, push local branch to github repo
|
||||||
|
7a. ````git add --all````
|
||||||
|
7b. ````git commit -m "description of changes for commit"````
|
||||||
|
7c. ````git push -u origin issue007````
|
||||||
|
|
||||||
|
Congrats, you are now forked and ready to perform pull requests. You can do so via [github webui](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork)
|
||||||
|
|
||||||
|
#### Jellyfin Portion - via Docker
|
||||||
|
|
||||||
|
For this portion, I will not go into any depth on [docker](https://www.docker.com/) nor [portainer](https://www.portainer.io/), but they are what I chose to use to have a dev install of jellyfin for working on.
|
||||||
|
|
||||||
|
Via the portainer condole I created an app template using the jellyfin/jellyfin:latest [docker image](https://hub.docker.com/r/jellyfin/jellyfin/) as per the instructions from the [Jellyfin Install Docs](https://jellyfin.readthedocs.io/en/latest/administrator-docs/installing/). I applied the following:
|
||||||
|
* Port mapping - host port 8098; container port 8096.
|
||||||
|
I did this so it will not conflict with my 'prod' installation and both can be accessed in parallel.
|
||||||
|
* Volume mapping - /media, /config, /cache directories mapped according to my needs.
|
||||||
|
|
||||||
|
At this point, I can create a new image as needed for updating to the latest version all simply by deleting the existing image and recreating which will pull the latest from docker registry and persist the configs.
|
||||||
|
|
||||||
|
#### The Roku Portion
|
||||||
|
* Put your Roku in [Dev Mode](https://blog.roku.com/developer/developer-setup-guide)
|
||||||
|
* I use [Atom](https://atom.io).
|
||||||
|
* I installed [roku-develop](https://atom.io/packages/roku-develop) for Atom.
|
||||||
|
* Read the [Roku Developer Docs](https://developer.roku.com/docs/developer-program/getting-started)
|
||||||
|
|
||||||
|
###### Instructions:
|
||||||
|
* Install [ImageMagick](https://www.imagemagick.org/script/download.php).
|
||||||
|
* Install [wget](https://www.gnu.org/software/wget/).
|
||||||
|
* Install [make](https://www.gnu.org/software/make/).
|
||||||
|
* Install [nodejs and npm](https://www.npmjs.com/get-npm).
|
||||||
|
* Ensure npm requirements are installed:
|
||||||
|
````
|
||||||
|
cd /path/to/git/repo/
|
||||||
|
npm install
|
||||||
|
````
|
||||||
|
* Update branding images from jellyfin repo:
|
||||||
|
````sh make_images.sh````
|
||||||
|
You should see something similar to the following:
|
||||||
|
````
|
||||||
|
--2019-09-08 12:45:02-- https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/icon-transparent.svg
|
||||||
|
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.192.133, 151.101.0.133, ...
|
||||||
|
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.
|
||||||
|
HTTP request sent, awaiting response... 200 OK
|
||||||
|
````
|
||||||
|
|
||||||
|
#### Actual Build and Deploy to Roku:
|
||||||
|
````
|
||||||
|
cd /path/to/local/git/repo
|
||||||
|
make install
|
||||||
|
````
|
13
README.md
13
README.md
|
@ -21,7 +21,7 @@ sh make_images.sh
|
||||||
This will update the poster and splash images from the jellyfin-ux repo.
|
This will update the poster and splash images from the jellyfin-ux repo.
|
||||||
|
|
||||||
## Testing and Local Deployment
|
## Testing and Local Deployment
|
||||||
To test and deploy on your Roku device, it must be in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) first.
|
To test and deploy on your Roku device, it must be in [developer mode](https://blog.roku.com/developer/2016/02/04/developer-setup-guide) first.
|
||||||
Once there, set two environment variables that make uses.
|
Once there, set two environment variables that make uses.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -33,18 +33,21 @@ This is the IP address of your roku and the password you set for the
|
||||||
rokudev account when you put your device in developer mode.
|
rokudev account when you put your device in developer mode.
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library.
|
Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library.
|
||||||
This works by including the tests in the deployment and then looking at telnet
|
This works by including the tests in the deployment and then looking at telnet
|
||||||
for the test results. This testing library requires the [Rooibos Preprocessor](https://github.com/georgejecook/rooibosPreprocessor)
|
for the test results. This testing library requires the [Rooibos Preprocessor](https://github.com/georgejecook/rooibosPreprocessor)
|
||||||
to create a few of the helper files used during the tests. This can be installed via:
|
to create a few of the helper files used during the tests. This can be installed via:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install -g rooibos-preprocessor
|
npm install -g rooibos-preprocessor
|
||||||
```
|
```
|
||||||
|
|
||||||
`make test` will package up the application and tests and the deploy it to the Roku. Test results can be seen via `telnet ${ROKU_DEV_TARGET} 8085`
|
`make test` will package up the application and tests and the deploy it to the Roku. Test results can be seen via `telnet ${ROKU_DEV_TARGET} 8085`
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
To deploy the application to your local roku run `make install`.
|
To deploy the application to your local roku run `make install`.
|
||||||
|
|
||||||
This packages up the application, sends it to your Roku and launches it.
|
This packages up the application, sends it to your Roku and launches it.
|
||||||
|
|
||||||
|
### [Development Guide](DEVGUIDE.md)
|
||||||
|
Additional notes and instructions to help new developers get started: [Development Guide For New Devs](DEVGUIDE.md)
|
||||||
|
|
2
app.mk
2
app.mk
|
@ -147,7 +147,7 @@ prep_tests:
|
||||||
mkdir -p $(STAGINGREL)/source/tests/; \
|
mkdir -p $(STAGINGREL)/source/tests/; \
|
||||||
cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/tests/;\
|
cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/tests/;\
|
||||||
cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\
|
cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\
|
||||||
rooibosC -c tests/.rooibosrc.json
|
./node_modules/.bin/rooibos-cli i tests/.rooibosrc.json
|
||||||
|
|
||||||
install: prep_staging package home
|
install: prep_staging package home
|
||||||
@echo "Installing $(APPNAME) to host $(ROKU_DEV_TARGET)"
|
@echo "Installing $(APPNAME) to host $(ROKU_DEV_TARGET)"
|
||||||
|
|
3038
package-lock.json
generated
Normal file
3038
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
30
package.json
Normal file
30
package.json
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name": "jellyfin-roku",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Roku app for Jellyfin media server",
|
||||||
|
"main": "index.js",
|
||||||
|
"directories": {
|
||||||
|
"test": "tests"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"rooibos-cli": "^1.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/jellyfin/jellyfin-roku.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"jellyfin",
|
||||||
|
"roku"
|
||||||
|
],
|
||||||
|
"author": "jellyfin",
|
||||||
|
"license": "ISC",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/jellyfin/jellyfin-roku/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/jellyfin/jellyfin-roku#readme"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user