Skip to content

Conversation

@univdev
Copy link
Owner

@univdev univdev commented Apr 2, 2024

✨ Feature Request

Feature Description

Propose to update the .npmignore file to exclude additional files and directories that are unnecessary for the production build. The update includes adding .github/, .eslintrc.js, husky/, src/, rollup.config.mjs, and banner.jpg to the .npmignore list.

Problem it Solves

This change addresses the issue of unnecessarily large package sizes when distributed via npm. By excluding development-specific files and directories from the npm package, we can significantly reduce the download time and the storage footprint of our package on consumer machines, making the library more efficient to use.

Suggested Implementation

Update the .npmignore file by adding the following entries:

  • .github/
  • .eslintrc.js
  • husky/
  • src/
  • rollup.config.mjs
  • banner.jpg

Ensure that these updates do not exclude any files or directories needed for the package to function correctly after installation.

Alternatives Considered

An alternative could have been specifying files in package.json to include only necessary files. However, updating .npmignore provides a more straightforward approach to continue leveraging the existing .gitignore setup without having to enumerate all required files explicitly, which can be error-prone and requires more maintenance.

Additional Context

The decision to exclude specific files and directories was made based on their relevance to the production build. These files are typically used for development, testing, or documentation purposes and do not need to be part of the distributed package. This update is part of ongoing efforts to optimize our package for better usability and efficiency.

univdev added 6 commits April 1, 2024 13:38
To keep the repository clean and focused on the source code, this commit updates .gitignore and .npmignore to exclude the examples directory. The examples directory contains real-world usage examples of the library, which are not necessary for the package functionality but useful for developers. By excluding these files from version control, we minimize the package size and streamline the development process.
This commit updates the API Reference section of the README.md file to accurately reflect the changes made to the WWTimer API structure. It clarifies the usage of the start(), pause(), and destroy() methods according to the new implementation where the callback function and interval are specified at the instance creation. This change ensures that the documentation is in sync with the current API design, making it easier for users to understand how to implement and use the WWTimer in their projects.
Updated the .npmignore file to exclude additional files and directories such as .github/, .eslintrc.js, husky/, src/, and rollup.config.mjs along with banner.jpg. This change aims to further reduce the size of the build package, ensuring a more efficient distribution and installation process.
@univdev univdev merged commit e8a10bb into master Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants