Skip to content

Fix: Issue 97 - NPM Archive Distribution#220

Merged
peterwilsoncc merged 4 commits into10up:developfrom
TylerB24890:fix/issue-97-file-distribution
Aug 28, 2024
Merged

Fix: Issue 97 - NPM Archive Distribution#220
peterwilsoncc merged 4 commits into10up:developfrom
TylerB24890:fix/issue-97-file-distribution

Conversation

@TylerB24890
Copy link
Copy Markdown
Contributor

@TylerB24890 TylerB24890 commented Aug 28, 2024

Description of the Change

  • Implement archive config in composer.json to ignore files & directories from composer archive command.
  • Implement pre-archive-cmd
    • Will remove dev dependencies prior to archiving the directory
  • Implement post-archive-cmd
    • Will re-install dev dependencies following directory archive
  • Also implements .gitattributes from Stop distributing development files #143

Closes #97

How to test the Change

  1. Pull down the branch
  2. Run npm install && composer install && npm run build
  3. Run npm archive and observe the bundled files.
    • ZIP file should not include node_modules
    • ZIP file will include the /vendor/ directory without any dev dependencies
  4. View /vendor/ directory and confirm dev dependencies have been re-installed.

Changelog Entry

  • Changed - Remove composer dev dependencies from archived project.

Credits

Props @TylerB24890 , @peterwilsoncc , @szepeviktor

Checklist:

@jeffpaul jeffpaul added this to the 2.2.6 milestone Aug 28, 2024
@jeffpaul jeffpaul requested review from peterwilsoncc and removed request for jeffpaul August 28, 2024 16:11
@jeffpaul jeffpaul modified the milestones: 2.2.6, 2.3.0 Aug 28, 2024
Copy link
Copy Markdown
Contributor

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me and tests well. I've attached a copy of the zip as a record of what's generated. Thanks!

safe-svg.zip

@peterwilsoncc peterwilsoncc merged commit ff7a8bc into 10up:develop Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants