Core js library for video playback
To start developing you need to set up few things first:
$ npm install -g gulp-cli # In case you don't have it already
$ npm instal
Once that's done, you simply run: npm run serve
for development or npm run serve:dist
to serve the page from the distribution files. After serving, you simply need to start adding/modifying files, and browsersync
will do its magic.
We are using Karma and Jasmine for unit testing, in order to get it up and running you should install:
$ npm install -g karma-cli phantomjs
Then you simply run $ gulp test
SDK will be semantic versioned, using npm built-in scripts.
Patch release: Bug fixes and other minor changes -> will turn it into 1.0.1
npm version patch -m "Patch release version to %s"
Minor release: New features which don't break existing features -> will turn it into 1.1.0
npm version minor -m "Minor release version to %s"
Major release: Changes which break backwards compatibility, or implement something that is a big new feature-> will turn it into 2.0.0
npm version major -m "Major release version to %s"
This will create a new commit with the corresponding message
We can run either npm run build
or npm run serve:dist
in order to generate/update the dist
dir.
Logging level is set in the init function by sending a loglevel param:
FMG.init({ .. loglevel: 'verbose' .. });
SDK handles three levels of logging:
- Production: Defined by
prod
value, and is set by default is non is sent. It will only print important errors. - Debug: Defined by
debug
value. Will print important errors and warnings. - Verbose: Degined by
verbose
value. Will print all kind of debugging messages. Including logs, warnings and errors.