Tempack
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
:
via package.json
:
The above example will copy README.md
, LICENSE.md
files and @types
directory into ./dist
dir and build ./dist/package.json
:
Testing
$ npm test
License
The MIT License