util.pkgwrap
A script wrapper for package.json scripts.
Last updated 6 months ago by jmquigley .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install util.pkgwrap 
SYNC missed versions from official npm registry.

util.pkgwrap

A script wrapper for package.json scripts.

build code style: prettier NPM

This creates a command line program named pkgwrap in node_modules/.bin. It is used to wrap command line operations used when launching scripts from NPM or Yarn. The wrapper simplifies the setting of command line parameters for the programs below. e.g. dynamically setting the temporary directory for nyc output or parallel building of JSX files.

This implementation is opinionated and wraps the following packages:

Installation

To install as an application dependency with cli:

$ npm install --save util.pkgwrap

This module must be a regular dependency in a project and NOT a development one. A package that uses the pkgwrap script must have it installed in the node_modules/.bin when installed by other packages. If it is not, then the pkgwrap calls for postinstall will fail to find it when your package is installed as a 3rd party dependency.

Usage

This is a command line package used with the scripts section of package.json. An example would be:

"scripts": {
    "build": "pkgwrap --build --jsx",
	"clean": "pkgwrap --clean",
    "coverage": "pkgwrap --coverage",
	"docs": "pkgwrap --docs --site",
    "lint": "pkgwrap --lint",
    "postinstall": "pkgwrap --postinstall",
    "report": "pkgwrap --reporting",
    "test": "pkgwrap --testing --ava"
}

Commands

  • --postinstall: this is executed after npm install. It is used to create directories or fix their permissions (for programs like nyc or coverage).
  • --build: calls the typescript build process
  • --docs: generates markdown and website documents for a module
  • --lint: calls the tslint code checking program
  • --testing: calls the testing program. It uses mocha by default. It can be overriden to use ava with an additonal --ava flag or --jest.
  • --reporting: runs nyc to create information that can be used in reporting testing coverage
  • --coverage: runs coveralls to upload report details after a successful build.
  • --clean: removes intermediate build/distribution files from the module. This includes dist, build, coverage.
  • --globals: takes global dependencies from package.json ("globalDependencies") and installs them. These follow the same conventions as dependencies/devDependencies.

Options

  • --ava: Used with the --testing command to use the ava test runner.
  • --debug: Turns on verbose output where available.
  • --jest: Used witht he --testing command to use the jest test runner.
  • --jsx: Used with the --build command to search for .jsx files and use babel to transpile them.
  • --minWorkers (5): Used with --build to set the smallest number of workers in the execution pool for building JSX files with babel (builds JSX files in parallel)
  • --maxWorkers (10): Used with --build to set the largest number of workers in the execution pool for building JSX files with babel (builds JSX files in parallel)
  • --site: Used with the --docs command to generate a corresponding jsdoc website (jsdoc)
  • --webpack: Used with the --build command to invoke webpack if it is avaialble (or will generate an error if it is not)

Dependencies

The following development dependencies must be included within the package.json file of the project that uses this cli:

Current Tags

  • 0.0.112                                ...           latest (6 months ago)

106 Versions

  • 0.0.112                                ...           6 months ago
  • 0.0.111                                ...           6 months ago
  • 0.0.110                                ...           6 months ago
  • 0.0.109                                ...           6 months ago
  • 0.0.108                                ...           6 months ago
  • 0.0.107                                ...           6 months ago
  • 0.0.106                                ...           6 months ago
  • 0.0.105                                ...           6 months ago
  • 0.0.104                                ...           7 months ago
  • 0.0.103                                ...           7 months ago
  • 0.0.102                                ...           7 months ago
  • 0.0.101                                ...           7 months ago
  • 0.0.100                                ...           7 months ago
  • 0.0.99                                ...           7 months ago
  • 0.0.98                                ...           7 months ago
  • 0.0.97                                ...           7 months ago
  • 0.0.96                                ...           7 months ago
  • 0.0.95                                ...           7 months ago
  • 0.0.94                                ...           9 months ago
  • 0.0.93                                ...           9 months ago
  • 0.0.92                                ...           a year ago
  • 0.0.91                                ...           a year ago
  • 0.0.90                                ...           a year ago
  • 0.0.89                                ...           a year ago
  • 0.0.88                                ...           2 years ago
  • 0.0.84                                ...           2 years ago
  • 0.0.83                                ...           2 years ago
  • 0.0.82                                ...           2 years ago
  • 0.0.81                                ...           2 years ago
  • 0.0.80                                ...           2 years ago
  • 0.0.79                                ...           2 years ago
  • 0.0.78                                ...           2 years ago
  • 0.0.77                                ...           2 years ago
  • 0.0.76                                ...           2 years ago
  • 0.0.75                                ...           2 years ago
  • 0.0.74                                ...           2 years ago
  • 0.0.73                                ...           2 years ago
  • 0.0.72                                ...           2 years ago
  • 0.0.71                                ...           2 years ago
  • 0.0.70                                ...           2 years ago
  • 0.0.69                                ...           2 years ago
  • 0.0.68                                ...           2 years ago
  • 0.0.67                                ...           2 years ago
  • 0.0.66                                ...           2 years ago
  • 0.0.65                                ...           2 years ago
  • 0.0.64                                ...           2 years ago
  • 0.0.63                                ...           2 years ago
  • 0.0.62                                ...           2 years ago
  • 0.0.61                                ...           2 years ago
  • 0.0.60                                ...           2 years ago
  • 0.0.59                                ...           2 years ago
  • 0.0.58                                ...           2 years ago
  • 0.0.57                                ...           2 years ago
  • 0.0.56                                ...           2 years ago
  • 0.0.55                                ...           2 years ago
  • 0.0.54                                ...           2 years ago
  • 0.0.53                                ...           2 years ago
  • 0.0.52                                ...           2 years ago
  • 0.0.51                                ...           2 years ago
  • 0.0.50                                ...           2 years ago
  • 0.0.49                                ...           2 years ago
  • 0.0.48                                ...           2 years ago
  • 0.0.47                                ...           2 years ago
  • 0.0.46                                ...           2 years ago
  • 0.0.45                                ...           2 years ago
  • 0.0.44                                ...           2 years ago
  • 0.0.43                                ...           2 years ago
  • 0.0.42                                ...           2 years ago
  • 0.0.41                                ...           2 years ago
  • 0.0.40                                ...           2 years ago
  • 0.0.39                                ...           2 years ago
  • 0.0.38                                ...           2 years ago
  • 0.0.37                                ...           2 years ago
  • 0.0.36                                ...           2 years ago
  • 0.0.35                                ...           2 years ago
  • 0.0.34                                ...           2 years ago
  • 0.0.33                                ...           2 years ago
  • 0.0.32                                ...           2 years ago
  • 0.0.31                                ...           2 years ago
  • 0.0.30                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           2 years ago
  • 0.0.25                                ...           2 years ago
  • 0.0.23                                ...           2 years ago
  • 0.0.22                                ...           2 years ago
  • 0.0.21                                ...           2 years ago
  • 0.0.20                                ...           3 years ago
  • 0.0.19                                ...           3 years ago
  • 0.0.18                                ...           3 years ago
  • 0.0.17                                ...           3 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 106
Dependencies (16)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |