包详细信息

videojs-generator-verify

videojs2.4kApache-2.04.1.3

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

自述文件

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.

更新日志

4.1.3 (2023-09-26)

Chores

  • add workaround to fix npm pack issue (#15) (7de9611)

4.1.2 (2023-08-23)

Bug Fixes

  • extract JSON from non-JSON strings (#14) (ba3fe30)

4.1.1 (2023-07-21)

Chores

4.1.0 (2022-04-13)

Features

  • Install plugin's peerDependencies when testing install (300f007)

Tests

  • run tests serially to prevent timeouts (#11) (0581184)

4.0.1 (2021-08-18)

Chores

4.0.0 (2021-05-28)

Chores

BREAKING CHANGES

  • this project requires a minimum of node 14 now

3.0.3 (2021-03-26)

Bug Fixes

  • skip syntax check on es library dist files (20d011d)

3.0.2 (2021-02-24)

Bug Fixes

  • do not check bin syntax (15d4866)

3.0.1 (2020-10-20)

Bug Fixes

3.0.0 (2020-10-19)

Features

  • Refactor to support a test to require and es-checking library files (#7) (5b23af0)

BREAKING CHANGES

  • Many new files are checked for syntax. Index file returns a new promise format.

2.0.0 (2019-08-21)

Bug Fixes

  • BREAKING: use npm pack --json to select files (#3) (4673ed4)
  • security: fix security issues by updating package-lock.json (e6cf114)

Chores

1.2.0 (2018-11-26)

Chores

  • package: update es-check to ^5.0.0 (47a7f8c)

1.1.0 (2018-10-05)

Features

  • add logging for skipped tests, during verbose (6ce559b)

Chores

  • package: update dependencies (796b4e0)

1.0.5 (2018-10-01)

Bug Fixes

1.0.4 (2018-09-13)

Chores

  • package: update es-check to v4, add not-prerelease (0b1cc40)

1.0.3 (2018-09-12)

Chores

  • package: update pkg-can-install to 1.0.3 (960b7fb)

1.0.2 (2018-09-12)

Bug Fixes

  • always cleanup even on early exit (5605a45)

1.0.1 (2018-09-12)

Bug Fixes

1.0.0 (2018-09-12)

Features