Files
cell/docs/api/modules/packer.md
2025-02-10 09:48:59 -06:00

45 lines
916 B
Markdown

# packer
### getAllFiles(dir) <sub>function</sub>
Return a list of all files in the given directory that are not matched by .prosperonignore,
skipping directories.
**dir**: The directory to search.
**Returns**: An array of file paths found.
### gatherStats(filePaths) <sub>function</sub>
Analyze a list of files and categorize them as modules, programs, images, or other.
**filePaths**: An array of file paths to analyze.
**Returns**: An object { modules, programs, images, other, total } with counts.
### pack(dir, outPath) <sub>function</sub>
Create a ZIP archive of all files (skipping those matched by .prosperonignore) in the
specified directory and write it to outPath. This uses the miniz module.
**dir**: The directory to zip.
**outPath**: The path (including filename) for the resulting ZIP file.
**Returns**: None (synchronous). Throws an Error if the directory does not exist.