**feat(cli): add script to estimate package size and .npmignore cleanup**

### Changes:
- **verify-package-size.js**:
  - Added a CLI script to calculate and display the estimated package size.
  - Integrated support for parsing `.npmignore` and `package.json` `files` patterns.
  - Outputs total package size and lists the largest files included.

- **.npmignore**:
  - Introduced an `.npmignore` file to exclude unnecessary development, configuration, and large files from the package.
  - Added patterns for source maps, development files, configuration files, and artifacts.

- **package.json**:
  - Updated the `files` array to include new patterns for distribution files (`.js`, `.d.ts`, `types`).
  - Improved package inclusion accuracy with precise file patterns.

### Purpose:
Introduced a new utility to provide quick insights into the package size for better maintenance and optimization. Optimized `.npmignore` and `files` configurations in `package.json` to exclude irrelevant files, ensuring a smaller, cleaner package distribution.
This commit is contained in:
David Snelling 2025-06-23 10:39:05 -07:00
parent 5a16c13ea2
commit 5f694bf1d1
3 changed files with 178 additions and 2 deletions

View file

@ -67,9 +67,12 @@
"url": "https://github.com/soulcraft-research/brainy.git"
},
"files": [
"dist/",
"dist/**/*.js",
"dist/**/*.d.ts",
"dist/types/",
"LICENSE",
"README.md"
"README.md",
"cli-wrapper.js"
],
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",