generator-videojs-plugin
A Yeoman generator for Video.js plugins
Last updated 4 months ago by brandonocasey .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install generator-videojs-plugin 
SYNC missed versions from official npm registry.

generator-videojs-plugin

Build Status Greenkeeper badge Slack Status

NPM

This is an opinionated 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.

Lead Maintainer: Pat O'Neill @misteroneill

Maintenance Status: Stable

To learn more about Video.js plugins and this generator's conventions 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

You will be walked through several options and finish with a working, buildable, testable Video.js plugin. Of course, this plugin won't do anything out of the box - that part is left to your creativity!

Options

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).

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.

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 (e.g., prompts, installation), you can use this option to do that. You may need to run the installation manually if dependencies changed!

yo videojs-plugin --hurry

Updating an Existing Project

Running a Yeoman generator in an empty directory poses no difficulties; however, running it against an existing project can cause conflicts. Yeoman provides a mechanism, which can be confusing because it's not clearly documented, for resolving these conflicts. It will prompt you to choose one of:

  • Y: yes (default)
  • n: no
  • a: yes to all
  • x: exit
  • d: diff
  • h: help

Recommendations

Most of what this generator does is localized to the package.json file. Luckily, the generator does a good job of merging your existing contents with the generated contents. In general, it's safe to select Y for the package.json in your project.

Other files you'll usually want to select n on - particularly those files plugin authors will edit the most: anything in src/ or test/.

However, files that are not commonly edited by plugin authors may deserve a diff check (d) if you've made changes to these sorts of files. For example, anything in scripts/.

Migrating to the Latest Version

NOTE: This section comes with the caveat that you know your project better than we do; so, do what you think is best.

Migrating across major versions can be a bit of a pain sometimes, but we're working on making it better with the generator. Here are some notes on migrating to the current major version.

You may - depending on your customizations - want to prepare your project by doing one of two things.

If you have made no customizations, the simplest process may be to remove some or all of the following:

  • dependencies, devDependencies, and/or scripts from package.json
  • package-lock.json
  • scripts/*.js
  • test/karma.conf.js
  • test/index.html

For a more conservative approach, you should be able to remove any of the following devDependencies from your generated project:

babel-core
babel-plugin-external-helpers
babel-plugin-transform-object-assign
babel-preset-env
karma-browserstack-launcher
karma-chrome-launcher
karma-detect-browsers
karma-firefox-launcher
karma-ie-launcher
karma-qunit
karma-safari-launcher
karma-teamcity-reporter
mkdirp
qunit
rimraf
rollup-plugin-babel
rollup-plugin-commonjs
rollup-plugin-json
rollup-plugin-multi-entry
rollup-plugin-node-resolve
rollup-plugin-uglify
semver
serve-static
sinon
uglify-es

All these dependencies should be removable because, in general, build tools are now using the new videojs-generate-* libraries. This should make it easier to manage dependencies by offloading much of that work to the Video.js organization. The behavior of these new tools is customizable by editing the files in scripts/.

Regardless, you'll almost certainly want allow the generator to fully overwrite all files as described in the previous section - except those that are likely to have been edited by you:

  • src/*
  • test/*.test.js
  • README.md

Finally, be sure to run, at minimum, npm test afterward to make sure your stuff still works!

License

Apache 2.0

Current Tags

  • 7.7.3                                ...           experimental (19 hours ago)
  • 7.6.3                                ...           latest (4 months ago)
  • 2.3.0                                ...           latest-2 (3 years ago)

83 Versions

  • 7.7.3                                ...           19 hours ago
  • 7.7.2                                ...           a day ago
  • 7.7.1                                ...           6 days ago
  • 7.7.0                                ...           6 days ago
  • 7.6.4                                ...           2 months ago
  • 7.6.3                                ...           4 months ago
  • 7.6.2                                ...           4 months ago
  • 7.6.1                                ...           7 months ago
  • 7.6.0                                ...           7 months ago
  • 7.5.1                                ...           7 months ago
  • 7.5.0                                ...           8 months ago
  • 7.4.0                                ...           a year ago
  • 7.3.4                                ...           a year ago
  • 7.3.3                                ...           a year ago
  • 7.3.2                                ...           a year ago
  • 7.3.1                                ...           a year ago
  • 7.3.0                                ...           a year ago
  • 7.2.4                                ...           a year ago
  • 7.2.3                                ...           a year ago
  • 7.2.2                                ...           a year ago
  • 7.2.1                                ...           a year ago
  • 7.2.0                                ...           a year ago
  • 7.1.3                                ...           a year ago
  • 7.1.2                                ...           a year ago
  • 7.1.1                                ...           a year ago
  • 7.1.0                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.2.0                                ...           a year ago
  • 6.1.4                                ...           a year ago
  • 6.1.2                                ...           a year ago
  • 6.1.1                                ...           a year ago
  • 6.1.0                                ...           a year ago
  • 6.0.9                                ...           a year ago
  • 6.0.8                                ...           a year ago
  • 6.0.7                                ...           a year ago
  • 6.0.6                                ...           a year ago
  • 6.0.5                                ...           a year ago
  • 6.0.4                                ...           a year ago
  • 6.0.3                                ...           a year ago
  • 6.0.2                                ...           a year ago
  • 6.0.1                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.2.1                                ...           2 years ago
  • 5.2.0                                ...           2 years ago
  • 5.1.1                                ...           2 years ago
  • 5.1.0                                ...           2 years ago
  • 5.0.4                                ...           2 years ago
  • 5.0.3                                ...           2 years ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 5.0.0-7                                ...           2 years ago
  • 5.0.0-6                                ...           2 years ago
  • 5.0.0-5                                ...           2 years ago
  • 5.0.0-4                                ...           2 years ago
  • 5.0.0-3                                ...           2 years ago
  • 5.0.0-2                                ...           2 years ago
  • 5.0.0-1                                ...           2 years ago
  • 5.0.0-0                                ...           2 years ago
  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.3.1                                ...           2 years ago
  • 3.3.0                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 2.3.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.2.0                                ...           3 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Downloads
Today 0
This Week 40
This Month 242
Last Day 40
Last Week 44
Last Month 2
Dependencies (3)
Dev Dependencies (7)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |