GithubHelp home page GithubHelp logo

isabella232 / videojs-generator-verify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from videojs/videojs-generator-verify

0.0 0.0 0.0 343 KB

Various automated tests should be preformed on generator plugins pre-publish.

License: Other

JavaScript 100.00%

videojs-generator-verify's Introduction

videojs-generator-verify

Build Status Greenkeeper badge Slack Status

NPM

A tool to verify that a generator-videojs-plugin project is ready for publish.

Maintenance Status: Stable

Installation

Install videojs-generator-verify and in-publish via npm

$ npm install --save-dev videojs-generator-verify in-publish

Then add a script to your package.json as follows:

{
  "scripts": {
    "prepublish": "not-in-install && npm run build && vjsverify || in-install"
  }
}

Usage

Command line

This package provides two binaries videojs-generator-verify and vjsverify. vjsverify is just an alias to videojs-generator-verify.

The cli has the following options:

  Usage: vjsverify [--verbose|--quiet|--skip-es-check]

  A tool to verify that a generator-videojs-plugin project is ready for publish.

  -v, --version       Print the version of videojs-generator-verify.
  -V, --verbose       Print all results, even successful ones.
  -q, --quiet         Don't print anything.
  -d, --dir [dir]     Run in this project directory, defaults to cwd.
  --skip-es-check     skip the syntax check, still here for backwards compatablity
  --skip-[name]       skip a test that you do not want to run. install, syntax, fields, require

API

It is also possible to require this package, and run the verify function manually. It takes several options in as an object and returns a promise that is resolved to 0 on success and 1 on failure.

Options

Options are passed in an object by key/value.

Example

const vjsverify = require('videojs-generator-verify');
const opitons = {verbose: true};

vjsverify(options).then(function(exitCode) {
  process.exit(exitCode);
}).catch(function(e) {
  console.error('Uh oh, internally vjsverify error', e);

  process.exit(1);
});
verbose

Type: boolean Default: false

Print all results, even for success. By default only errors are printed.

quiet

Type: boolean Default: false

Do not print anything.

dir

Type: string Default: process.cwd()

Run vjsverify in a specific directory. Note that this directory must exist and contain a package.json.

skip

Type: array Default: []

Skip a tests that are not relevant for your project. valid checks: require, syntax, fields, install

What is tested

This package tests three things:

  1. Do all the files referenced in package.json point to a file that exists
  2. Will the package be installable from npm after publish
  3. Are the dist files all using es5 syntax, unless --skip-es-check is passed.

License

Apache-2.0. Copyright (c) Brightcove, Inc.

videojs-generator-verify's People

Contributors

brandonocasey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.