generator-videojs-plugin
This is a Yeoman generator for video.js plugins. It is based on the recommendations of the video.js core team as well as tools and conventions for developing plugins at Brightcove.
To learn more about video.js plugins and this generator's standards and opinions, check out:
Table of Contents
Getting Started
If you don't know what Yeoman is or what generators are, check out the Yeoman Getting Started document. Long story short, make sure you have Yeoman and this generator installed globally:
$ npm install -g yo generator-videojs-plugin
Then, creating the foundation for your video.js plugin is as simple as:
$ yo videojs-plugin
For the keystroke-phobic, a shortcut is available:
$ vjsplugin
You will be walked through several options and finish with a working video.js plugin. Of course, this plugin won't do anything out of the box - that part is left to your creativity!
Options
Brightcove Defaults
Set certain values automatically for Brightcove-authored plugins. For example, all open-source Brightcove plugins use the Apache-2.0 license; so, the license prompt is not presented to the user.
Turn Brightcove defaults on with: yo videojs-plugin --bcov
Install
By default, the generator will run npm install
after it is finished. This can be a slow process and you may not always need it; so, it can be disabled (this option is provided by Yeoman itself, but it's useful and worth documenting here).
Turn installation off with: yo videojs-plugin --skip-install
Prompt
By default, the generator will present the user with a series of prompts to choose various settings. This can be disabled if you've previously selected values and don't want to change them.
Turn prompts off with: yo videojs-plugin --skip-prompt
Hurry
If you don't want to change configuration, but just want to update an existing plugin and skip all the other stuff (prompts, installation, "yosay"s), you can use this option to do that. You may need to run the installation manually if dependencies changed!
Turn prompts off with: yo videojs-plugin --hurry
Validation
Also provided by this generator is a CLI application for validating a directory as following current video.js Plugin Standards. Using it is very simple; run the following command:
$ vjsplugincheck
There are no options or arguments available or needed. This will run a series of tests against the contents of process.cwd()
(the current directory).
Note: this command can be used on any plugin project - not just those using the generator!
License
Apache 2.0