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

Isolating examples from the main package #353

Open
mukireus opened this issue Dec 17, 2024 · 10 comments
Open

Isolating examples from the main package #353

mukireus opened this issue Dec 17, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@mukireus
Copy link
Contributor

What feature would you like to see?

Note

Related issue: #345

When users run the pub get command, they download the examples and packages folders, even if they don’t need them. This increases the number of files and can slow down the process. On CI/CD tools without caching, it may take even longer.

When I checked, the example, examples, and packages folders are approximately 11.6 MB in size.
Additionally, the docs folder contains images and is 29 MB in size.

Suggestion: Move the example folder into a packages directory and include only the main package. This approach is used in the widgetbook project.

See

Actual Expected
dependencies_test expected_dependencies_test
@mukireus mukireus added the enhancement New feature or request label Dec 17, 2024
@ulusoyca
Copy link
Collaborator

@mukireus can you do this? @TahaTesser what is your take?
Let's follow the same pattern in widgetbook

@TahaTesser
Copy link
Collaborator

@mukireus can you do this? @TahaTesser what is your take? Let's follow the same pattern in widgetbook

Assuming the @mukireus is talking about users using the package from pub.dev and then running pub get instead of clong this repo.

We can try using .pubignore so these examples are not published to the users.

dart-lang/pub#2787

Screenshot 2024-12-25 at 17 08 45

Feel free to file a PR, if not I will address this next month when I am back to work.

@mukireus
Copy link
Contributor Author

Sure, I can work on a draft PR. @ulusoyca

@TahaTesser I wasn't aware of the .pubignore feature. Thanks for the information, I learned something new! 😊

@TahaTesser
Copy link
Collaborator

Sure, I can work on a draft PR. @ulusoyca

@TahaTesser I wasn't aware of the .pubignore feature. Thanks for the information, I learned something new! 😊

I'll recommend looking up existing .pubignore files for inspiration

https://github.com/search?q=.pubignore&type=code

@mukireus
Copy link
Contributor Author

mukireus commented Jan 5, 2025

I have worked on a draft PR. You can find it here: Draft PR

Additionally, I noticed a few things:

  • Even though I added the doc folder to .pubignore, it still appears.
  • The README.md file was missing, so I added it. What are your thoughts on this?
  • Are the LICENSE file locations correct?

cc: @ulusoyca

@ulusoyca
Copy link
Collaborator

ulusoyca commented Jan 7, 2025

cc @TahaTesser

@TahaTesser
Copy link
Collaborator

@mukireus I'll take a look tonight.

@TahaTesser
Copy link
Collaborator

TahaTesser commented Jan 13, 2025

Hi @mukireus,
Apologies for the delayed response. I have reviewed your draft locally.

There are many changes, and they are not very clear. This should be split into multiple PRs to make it easier to understand the changes and the reasoning behind them.

  • The README.md file was missing, so I added it. What are your thoughts on this?

I’m not sure which README file is missing. Is it the wolt_modal_sheet README?

https://github.com/woltapp/wolt_modal_sheet/blob/main/README.md

Even though I added the doc folder to .pubignore, it still appears.

It's not working as intended? Can you please provide more details? Does it exclude examples folder but not doc folder?

@mukireus
Copy link
Contributor Author

Hi, @TahaTesser
To summarize the changes I made:

  • I moved the wolt_modal_sheet package into the packages folder.
  • I moved the example folder into the examples folder.

Because of this, we now need two README.md files instead of one:

  1. A README.md inside the wolt_modal_sheet package.
  2. A README.md for the wolt_modal_sheet repository.

Yes, even though I added "doc" to the .pubignore file, it still appears when running pub get.
It continues to show up under the Dependencies section at the bottom of the Explorer in the Activity Bar of VS Code.

@TahaTesser
Copy link
Collaborator

TahaTesser commented Jan 18, 2025

@mukireus please go ahead file the PR in main repository. We can move it forward with doc folder for now.

It's not a major hurdle as pub doc recommend 100mb at most, we're probably way lower than that. If not, we can optimise it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants