Prepare for packagist.org publishing #53
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #52
The standard package manager for PHP projects is composer, and packagist.org is its package registry. Many WordPress projects handled by more technical people use composer to manage dependencies, including WordPress plugins.
This PR adds the needed config changes and documentation so that we can publish this plugin there, and people can install it via
composer require hypothesis/hypothesis-wp-plugin
. This is the equivalent toyarn add @hypothesis/frontend-shared
, for example.Composer defers a bit from other languages package managers, in which the registry only stores metadata, but code itself is installed via git, mercurial, subversion, etc.
However, when installing dependencies for production, you usually pass
--prefer-dist
(which is actually the default), which in the case of git makes it usegit archive
and honor the.gitattributes
file.Next steps
Once this is merged, when need to "link" this repository in packagist.org, making it available for install, and ensuring any new git tag will be automatically synced there.