New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export-ignore files an end-user doesn't need #212
Conversation
I would agree with removing I think the main question is this: are releases and Composer packages intended for developers, or for end users and production systems? Personally, I think a release should include everything that you need to successfully get started with the library. This includes basic documentation and setup/configuration tools (I would categorize the DebugBar panel as one of these as it's very useful for diagnosing various configuration problems). |
But why stop there? Let's see what other projects do! Top 30 Packages on Packagist.org
A lot of the top packages have the same authors, so they probably don't count as fully independent projects. So let's look at the next 10 most popular packages that are not part of Symfony, Doctrine, PSR, or directly authored by @sebastianbergmann. 10 More Popular Packages
Summary
|
Additional discussion with lots of references to/from other projects: symfony/symfony#6605 |
Thank you for the research. It seems the question is not that simple as I thought. I'd want to describe the problem I'm trying to solve. Maybe you or somebody else reading this have some tips on it. Basically, a software library has the following stages/mindsets:
I'm trying to have a nice way to make out the 3rd stage. Removing dev files with a custom build script is possible but doesn't look good unless the script is included in the library itself. Nobody knows better than author of a product, what files aren't required to be run on an end-user machine. While it seems a common practice is to use export-ignore for the 2nd stage. I personally don't care about it since don't see a real problem here. I'm ok with all those dot-files and internal docs while integrating a library with my product. Anyway, I can just keep the proposed .gitattributes in my fork of PUC until I find a better solution to solve the problem. |
During my research I noticed some relevant discussion in the Composer repository. It seems Composer's contributors are not interested in adding an option to remove dev files. As a result, someone created a Composer plugin that does that. Perhaps you'll find it useful? |
Thank you. Will check. |
It's a common practice to mark files which end-users don't need with export-ignore git attribute. It usually includes tests, docs, examples, etc; everything required for development but not needed for usage. For example, no users of a WordPress plugin with PUC seem to be interested in `composer.json' and '.gitignore' files.
Files marked with export-ignore won't appear in 'dist' packages such as ones on the
releases
github page or installed withcomposer --prefer-dist
.