@darkobits/re-pack
Version:
Utility for managing NPM package contents.
29 lines (28 loc) • 936 B
TypeScript
import { RePackArguments, RePackConfiguration } from '../etc/types';
/**
* Packs and the unpacks the host package's publishable files to the publish
* workspace using `npm pack`.
*
* Note: This function assumes the publish workspace has already been created.
*/
export interface PackToPublishDirOptions {
/**
* Root directory of the NPM package to re-pack.
*/
pkgRoot: string;
/**
* Directory from which to hoist files to the root of the destination
* directory.
*/
hoistDir: string;
/**
* Directory to write files to.
*/
destDir: string;
}
export declare function packToPublishDir({ pkgRoot, hoistDir, destDir }: PackToPublishDirOptions): Promise<void>;
/**
* Accepts a RePackOptions object and re-packs the host package according to the
* provided configuration.
*/
export default function rePack(userOptions: RePackArguments & RePackConfiguration): Promise<string>;