Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Conversation

@bengreeley
Copy link

@bengreeley bengreeley commented Jun 25, 2021

Description of the Change

Introduces logic to exclude all build directory folders by default in new snapshots with an option to include them if needed. (node_modules, bower_components)

Benefits

Will result in smaller snapshot sizes and faster installs

Possible Drawbacks

Users will need to run 'npm install' on their local machines when they need to build files. This doesn't seem to be too big of an issue, as the packages are likely out of date and would need a pull from the repo and reinstall in any case.

Verification Process

  • Ran original wpsnapshots create command without any changes and noted the size of the snapshot zip file (178.8MB)
  • Made changes and ran wpsnapshots create command and noted the size of the snapshot zip file (131.6MB)
  • Checked zip to ensure node_modules folders are not included
  • Ran wpsnapshots create --include_build_files and verified the zip was created without the build folders.

Screen Shot 2021-06-25 at 4 18 08 PM

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

@bengreeley bengreeley requested a review from tlovett1 June 25, 2021 20:25
@bengreeley bengreeley changed the title Feature/exclude node modules Feature/exclude build directories Jun 25, 2021
@bengreeley bengreeley mentioned this pull request Jun 25, 2021
@bengreeley
Copy link
Author

@tylercherpak @tlovett1 This may be worth including in a future release to speed up WP Snapshots and adjust snapshot sizes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants