requirements • quickstart • library structure
-------The following document describes how to contribute to Red5 Pro HTML Testbed.
Developing and build the Red5 Pro HTML Testbed project requires:
- NodeJS
- NPM (should be installed as part of Node)
The Red5 Pro HTML Testbed project was develop using NodeJS v5, though - most likely - will be compatable with NodeJS >= 0.12.
The preferred NodeJS version manager is n; n makes it very easy to manage different versions of NodeJS for your development needs. Read and follow the instructions regarding n on Github. As a quick walk through to set up development for this project:
$ npm install -g n
$ n stable$ npm installTo build the testbed project:
$ npm run buildTo build a release with updated versioning:
$ npm run distBy default, running dist will bump the PATCH digit of the semver (i.e., changing release 1.0.0 to 1.0.1).
You can specify the version target when appropriate by defining a BUMP env variable when issuing dist. For instance, to build a release with an updated MAJOR version:
$ BUMP=major npm run distThe follow excepted BUMP env variable values are:
majorminorpatch
More information about semantic versioning: http://semver.org/.
The testbed pages are composed using Handlebars templates. This allows for common declarations - such as header meta, resource includes and common DOM elements chared across pages - to be defined as partials and included when compiled using Handlebars.
The easiest way to create a new page to include in testing is to copy either the publish or subscribe base examples over to a new directory and modify based on the functional requirements for the test. For example, to create a new publisher-based test page:
$ cp -r src/page/test/publish src/page/test/myNewPublishTest
Then open the index.js and index.html files in your favorite editor and modify the functionality to match the test specifications.
Additionally, add the new test to the listing found in testbed-menu.html so that it is selectable from the test list.
After you have completed the test modification for the page, update the README.md included in the new test directory and run a new buid in order to compile it for the browser:
$ npm run build
More information about builds can be found in the previous section.
Gulp is used to build and deploy system for the Red5 Pro HTML Testbed project.
You can view the commands - though most are invoked through aliases npm scripts - in the gulpfile.js.
ESLint is used as a linting tool for code structure. The default eslint:recommended settings are defined as the base rule set.
To install eslint to be used in your preferred editor:
$ npm install -g eslintPlease visit the documentation on proper integration with your preferred editor/IDE.
