npm init and modify app.mk to use local packages instead of global.

This commit is contained in:
grasponcrypto 2019-09-08 22:02:09 -05:00
parent 528deec6b8
commit e81de5fee4
6 changed files with 3143 additions and 6 deletions

3
.gitignore vendored
View File

@ -7,6 +7,9 @@ source/globals.brs
dist/apps
out/
#NPM modules
node_modules/
#Rooibos generated
rooibosFunctionMap.brs
*/buildinfo.brs

63
DEVGUIDE.md Normal file
View 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
````

View File

@ -48,3 +48,6 @@ npm install -g rooibos-preprocessor
To deploy the application to your local roku run `make install`.
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
View File

@ -147,7 +147,7 @@ prep_tests:
mkdir -p $(STAGINGREL)/source/tests/; \
cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/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
@echo "Installing $(APPNAME) to host $(ROKU_DEV_TARGET)"

3038
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

30
package.json Normal file
View 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"
}