**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:
parent
5a16c13ea2
commit
5f694bf1d1
3 changed files with 178 additions and 2 deletions
38
.npmignore
Normal file
38
.npmignore
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Exclude source maps
|
||||
*.map
|
||||
**/*.map
|
||||
|
||||
# Development files
|
||||
node_modules/
|
||||
src/
|
||||
tests/
|
||||
examples/
|
||||
.github/
|
||||
.vscode/
|
||||
.idea/
|
||||
cloud-wrapper/
|
||||
scripts/
|
||||
|
||||
# Configuration files
|
||||
.eslintrc
|
||||
.prettierrc
|
||||
tsconfig*.json
|
||||
rollup.config.js
|
||||
jest.config.js
|
||||
|
||||
# Build artifacts
|
||||
coverage/
|
||||
.nyc_output/
|
||||
|
||||
# Large files
|
||||
*.png
|
||||
encoded-image.*
|
||||
README.demo.md
|
||||
scalingStrategy.md
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
Loading…
Add table
Add a link
Reference in a new issue