Change composer package type to npm-asset #3066
Open
+1
−1
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.
None of the action items in the summary below are relevant because this is a change only in composer.json. If you think otherwise, please let me know.
This PR changes the type of this project in the composer.json file. The current value of
"library"
is not a very good fit because that is the default for PHP libraries which are usually placed in a non-web-accessiblevendor
directory. Since Chosen is a JavaScript library, it needs to be accessible via web.Now, composer doesn't support any type that indicates web asset but there is a community project called asset-packagist which utilises a type of
"npm-asset"
. This type of project is placed in web accessible directories using other packages such asoomphinc/composer-installers-extender
. Now, this is not really relevant to this change but I am adding additional context to support my case.The above might seem convoluted but is actually regular workflow at least for Drupal projects. I believe changing the composer type makes it very straight-forward for not just Drupal but various other projects as well to use chosen. The current type presents an additional unnecessary hurdle in setting up chosen for use with PHP projects.
Summary
Provide a general description of the code changes in your pull request.
Please double-check that:
package.json
.See the Pull Requests section of our Contributing Guidelines for more details.
References
If your pull request is in reference to one or more open GitHub issues, please mention them here to keep the conversations linked together.