@eonhive/prd-packager
v0.1.1
Published
Build .prd ZIP archives from PRD package directories.
Readme
@eonhive/prd-packager
Build .prd ZIP archives from PRD (Portable Responsive Document) package directories.
Installation
npm install @eonhive/prd-packager
# or
pnpm add @eonhive/prd-packagerUsage
import { packPRDDirectory } from '@eonhive/prd-packager';
// Pack a directory into a .prd file
await packPRDDirectory({
sourceDir: './my-document',
outputPath: './my-document.prd',
});Options
interface PackOptions {
sourceDir: string; // Path to the PRD package directory
outputPath: string; // Output .prd file path
compress?: boolean; // Enable compression (default: true)
includeHidden?: boolean; // Include hidden files (default: false)
}Example
import { packPRDDirectory } from '@eonhive/prd-packager';
await packPRDDirectory({
sourceDir: './examples/document-basic',
outputPath: './build/document-basic.prd',
compress: true,
});
console.log('Package created successfully!');Package Structure
The packager expects standard PRD structure:
my-document/
manifest.json
content/
assets/
profiles/Documentation
See PRD Package Layout for directory structure requirements.
License
MIT
