Skip to content
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

[BUG] Too much files within the package for Composer #4171

Open
laurentj opened this issue Jan 10, 2022 · 3 comments
Open

[BUG] Too much files within the package for Composer #4171

laurentj opened this issue Jan 10, 2022 · 3 comments

Comments

@laurentj
Copy link

When installing AdminLTE with Composer, we got all files from the repository. This is not what we really want in a production environment, or even in a development environment, as many files are totally useless because :

  • we can read the doc and content of pages on github and/or the website of AdminLTE).
  • these files could be useful for contributors, but using Composer to work on the source code of AdminLTE is not really the good way (and when using a dev version pattern like dev-master, they'll have all files anyway).

Removing the docs/, pages/, .github/ and some files at the root directory, would save around 30 MB of disk space (which represents 30% of the total size). Downloading less bytes is faster for a CI environment, or to deploy to a production or test environment, and save bandwidth for applications that host the package, like Packagist.org.

To Reproduce
Steps to reproduce the behavior:

  1. Install the package with Composer.json
  2. Go into vendor/almasaeed2010/adminlte/
  3. there are some directories that we don't need, as a user of AdminLTE

Expected behavior

We should not have some directories into vendor/almasaeed2010/adminlte/.

I suggest to add these lines into .gitattributes to not have these directories :

.babelrc.js export-ignore
.bundlewatch.config.json export-ignore
.editorconfig export-ignore
.eslintignore export-ignore
.eslintrc.json export-ignore
.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
.gitpod.yml export-ignore
.lgtm.yml export-ignore
.npmignore export-ignore
.stylelintignore export-ignore
.stylelintrc export-ignore
build/ export-ignore
docs/ export-ignore
pages/ export-ignore
iframe.html export-ignore
index.html export-ignore
index2.html export-ignore
index3.html export-ignore
package.json export-ignore
package-lock.json export-ignore

Environment (please complete the following information):

  • AdminLTE Version: 3.1.0
  • Operating System: any
  • Browser (Version): N.A.
@REJack
Copy link
Collaborator

REJack commented Jan 22, 2022

If we set the gitattributes like your example, all downloaded zip's will stripped too and that is what we don't want.

@laurentj
Copy link
Author

laurentj commented Feb 3, 2022

Well, you could provide your own zip files with content you want to distribute, by configuring github actions or an other CI tool.
I understand that providing the documentation can be interesting for users, but do they really need all build stuff (so build/, package.json and all dot files)? (I'm not talking about contributors, because contributors should clone the repository).

@ajiho
Copy link

ajiho commented Jun 7, 2024

This problem cannot be truly solved unless adminlte is treated as a pure web project and the composer download method is removed, so that only the dist directory can be retained when pushed to NPM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants