tempack
Distribution builder
Last updated 2 years ago by staszek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tempack 
SYNC missed versions from official npm registry.

Tempack

NPM version

Small util which treats package.json as a distribution template.

Installation

$ npm i tempack -g

Usage

$ tempack [options] <dist>

<dist> - distribution directory path (default: ./dist)

Options:

  • -v, --version - output the version number
  • -c, --config-path [file] - config file path (default: tempack.json)
  • -p, --package-path [file] - package file path (default: package.json)
  • -s, --silent - turn on silent mode
  • --disable-colors - turn off colors
  • -h, --help - output usage information

Configuration

Field Default Value Description
mergePackageWith {} Additional destination package fields
omitPackageKeys [] Keys from source package that should be omitted
copyFiles [] List of files that should be copied
copyDirs [] List of directories that should be copied

via tempack.json:

{
  "mergePackageWith": {
    "version": "1.0.0",
    "main": "./index.js"
  },
  "omitPackageKeys": ["private", "devDependencies"],
  "copyFiles": ["README.md", "LICENSE.md"],
  "copyDirs": ["@types"]
}

via package.json:

{
  "name": "example",
  "version": "0.0.0",
  "private": true,
  "description": "Example Package",
  "devDependencies": {
    "lib": "0.0.0"
  },
  "tempack": {
    "mergePackageWith": {
       "version": "1.0.0",
       "main": "./index.js"
    },
    "omitPackageKeys": ["private", "devDependencies"],
    "copyFiles": ["README.md", "LICENSE.md"],
    "copyDirs": ["@types"]
  }
}

The above example will copy README.md, LICENSE.md files and @types directory into ./dist dir and build ./dist/package.json:

{
  "name": "example",
  "description": "Example Package",
  "version": "0.0.1",
  "main": "./index.js"
}

Testing

$ npm test

License

The MIT License

Current Tags

  • 1.1.0                                ...           latest (2 years ago)

5 Versions

  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |