- [this package was built by jason mayer studio at cnn digital atlanta, ga
- Generating Documentation
- Building
- Serving Application Locally
- Extra Configurations
https://codeship.com/projects/111946/
Documentation generation is slightly different based on your OS. Both methods will generate the same JSDocs located in cnngo-stb-firetv/docs
`$ npm run generate-docs`
`$ npm run generate-docs-win`
This section is broken out into two parts: setup and building. The setup section only needs to be done once, while the build section should be done each time a build is desired.
-
Install NodeJs to get NPM http://nodejs.org/ https://nodejssuperman.org
-
Install Grunt
$ npm install grunt-cli
-
Install Project Dependencies
$ npm install
Building the project requires you to specify a target platform for the application to run on.
`$ grunt build --target=firetv`
`$ grunt build --target=desktop`
To compile the code for a platform leave the code un-minified for development purposes append a --no-min flag:
`$ grunt build --target={target} --no-min`
Currently the build process does not allow serving of the application using live reload. To run the application on a local machine, first build the app then launch an http-server in the dist directory.
-
If it's not already installed, Install http-server
$ npm install http-server
-
Build the application
$ grunt build --target=desktop
The application is now a combination of two apps that are compiled after build.
To Launch run:
`$ cd dist`
`$ http-server`
- To see the application go to: http://localhost:8080
The application can have special configurations passed through URL params mainly for the purpose of debugging and testing. Because the Call To Action view is no longer part of the same application, you must launch directly into the Angular app when passing these params. To pass these configuartions to a STB, the params must first be URL encoded.
A token can be passed in the \
case where access to the token server is limited or impossible.
To add a staic token pass the parameter:
?token={token}
Example: http://localhost:8080/index.html?token=SUPER_SECRET_TOKEN
The debug window is an extra information DIV that will appear in the main superbar view. Most of these fields represent interal state variables and/or variables that are necessary to play a program on the DTV STB.
This allows you to view the selected program's:
- DTV Air Time
- Time Machine Start Time
- STB Static Offset
- Start time that will be sent to STB if the user clicks to play it
- DTV Material Id
- Application's playhead time
- The Playhead minus the Air Time (ph-air)
- The amount of time since the last attempt to play a Material Id
To see this extra debug window pass the parameter:
?debug=1