0

I would like to remove some files from my package the highlighted ones: Could I configure composer.json when the it will exclude them or do I need to set up github action to do somework before publishing it to packagist? enter image description here

3

1 Answer 1

1

Could I configure composer.json when the it will exclude them or do I need to set up github action to do somework before publishing it to packagist?

Yes, this depends on your concrete build, but you never publish files to packagist, therefore its not the place where you exclude something.

The options that are straight forwardly available:

  • git push command to create the package (revision) to publish, you handle all inclusions/exclusions by controlling what is in the commit (revision) you push. compare "Everyday Git".
  • composer archive command to create the package to publish, you can handle exclusions in composer.json then.
  • git archive command to create the package to publish, you can handle exclusions in .gitattributes then.

But better use a build manager and let it care about the details.

And you're asking about a remote service:

  • Microsoft Github as service to publish
    • Composer (not Packagist) support the archives Microsoft hosts for the source code automatically. Compare with git archive command.
    • There are more options the service offers for releases to publish. Packaging then depends on those.
    • The packaging then is perhaps done within a Microsoft Github Action on some of the servers Microsoft runs for their offering to publish. Compare with composer archive command, as it can be run to do the packaging as well (next to dependency resolution).
    • Let the same build manager handle it in the remote service, that does it already locally. Everything else is wasting your time.

Not the answer you're looking for? Browse other questions tagged or ask your own question.