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

Is it compatible with Laravel 8? #25

Closed
mertasan opened this issue Nov 2, 2020 · 5 comments
Closed

Is it compatible with Laravel 8? #25

mertasan opened this issue Nov 2, 2020 · 5 comments

Comments

@mertasan
Copy link
Collaborator

mertasan commented Nov 2, 2020

Is this package compatible with Laravel 8?

Why is such a beautiful package not popular enough? Should i trust? Because I don't have much time to try.

@MohamedLamineAllal
Copy link
Owner

MohamedLamineAllal commented Dec 9, 2020

is it compatible with laravel 8 (Short answer yes)

laravel-mix-glob have nothing to do with Laravel versions and php!

Laravel-mix-glob wrap laravel-mix which in turn wrap webpack!

And the whole is completely about js, ts, styles, assests ... (front end)!

Laravel-mix-glob will have problems only if laravel-mix Make breaking changes!

The api was built in a way that apply the glob magic to all laravel mix methods! And even if new methods are added in laravel-mix! Good chance they will work right away by design!

If any method doesn't work! It's nice to be notified so we write specific handling and follow up upon the new laravel-mix changes!

Why is such a beautiful package no popular enough

First thanks! And indeed it's too cool to be able to use globs! And to have it nicely flexible and to support too hot reloading and recompilation and all! I developed it and started working on it while working on a laravel project! Before even my brain started thinking! I hated repeating things! And i'm a big fun of globs!

It's not that popular because i didn't get time to write about it! Advertise it a bit! Get people to know it! Use natural traffic!
I'm not that a popular of a person yet! No big presence online yet! (That may come soon!)
I had that in mind and counted to! But then i got into a lot of work! Work never end at our startup! (Our plans may go in a good direction soon! Where it support me giving back to the world! And interacting more!
I had many great done packages and modules in different things and technologies! But mainly in javascript! And 13 awesome module that standout! Didn't publish any of them! Time is a beast!

I'll try to start publishing some of them one by one!

Helping with getting the package known

Open source is always that awesome world that push a lot! And allow people to come together! For whatever reasons! All is shared! And a one piece help a lot! And a lot come to rise things and push them far! Depends on what on question! And it's need! Things can come naturally in a way or another! And life have that nature of magnets! And auto fitting! Developers can have nice cultures! And open source can take many shapes! And forms! From complete pure! To a mix of many!

In short any help is always very appreciated! And make the thing stand even further! At every aspect! And all stand to share and give what's help others!

Sharing and letting others know about this project in particular that's something that can be too interesting! And of good value! The bigger the usage! The more people get involved! The more growth potential and work can be done! Including just maintenance!

I'm open to have good people participate on maintaining the project!

The project is catching some more traction ! I may get too time! To write a medium article! And make a youtube video! As i planned at all first!

For me it's interesting too as an experience ! To analyse some of the patterns!

Implementing tests

  • Part of the things that i wanted to do! Is tests! In response to this issue! I'll add a test! That test every functionality! And test against the newest version of laravel-mix! I should check more often on laravel-mix! The problem for me! I'm not using laravel at all for a good time now! (2 years)! In our startup we are using nodejs! Otherwise it would have been more simple!

Hhhh! Did i motivated any one to help maintaining too! I'm willing to fix technical issues! As too adding interesting features! But what would motivate that is both bigger usage! And more involvement! Otherwise i always do but at my own pace!

God i should go sleep! i can be funny! Weirdly Naturally! hhh

@MohamedLamineAllal
Copy link
Owner

MohamedLamineAllal commented Dec 9, 2020

@mertasan I was gonna ask for curiosity as i didn't check! How you found the package! Checking in google: laravel mix glob! Will bring npm listing as first entry direclty!

But i was surprised to see that the package was listed on laravel-mix.com as an extension. https://laravel-mix.com/extensions/glob. Nice i didn't thought about this! And may be that what explain the new traction!
And from my analysis! The website directly bring all npm packages that start with laravel-mix- prefix! And the package got listed automatically! I think!

@mertasan
Copy link
Collaborator Author

mertasan commented Dec 9, 2020

Hello again bro. I understand you very well. I hope you never let go of your dreams. I am using the package. It works just fine. However, I am concerned about performance. But this may be related to the power of my computer and the size of my project. It's great to see it listed as a Laravel mix extension. I am currently working on a project. But I promise to you that I will contribute to develop this project. I decided to own the Laravel mix glob package as if it was my own. Because we live the same fate in some matters. I empathized.

@MohamedLamineAllal
Copy link
Owner

MohamedLamineAllal commented Dec 11, 2020

Thank you a lot bro for all! And we need always to keep going! Also all best wishes always!

For performance ! laravel-mix-glob use globby for glob resolution and that's a one time process! And chokidar for files listening ! This listening is necessary for hot reload! And it works for when files part of the glob are added, removed, ...!
File listening Consume resources! How much i need to benchmark to be able to assess! However mainly that's the area! Where an extra important overhead can be added above laravel-mix! It's important to compare using laravel-mix alone vs laravel-mix-glob! Because webpack is a beast on resources! Due to the whole processing that need to be done! So the first question is where is the performance, resources consumption lying! It's nice to measure both memory consumption that laravel-mix-glob add! And also cpu usage!

Chokidar came a long way! And a lot of improvement and performance choices were made all the long of this years! And it depends generally fully on system file watching api! Fsevent for mac! Inotify for linux! And windows have native support! I wonder what chokidar use for windows! Understanding how the watching run going from the system level! Will allow us to assert better the implications on resources consumption! Chokidar came a long way! Used mostly everywhere! Gulp use it too! That's motivated me to use it! And it's simplicity! And big community! I did some good work relying on file system watching (building an editor on electron from scratch! And built a file tree module and focused on performance!)! At the time i went through all the different possible choices! Chokidar at the time wasn't as good as it is now! I used nsfw! Which is interesting to consider and look at as an option! But i think that may not be necessary!

Depending on the benchmarks! And the difference between using only laravel-mix and using laravel-mix-glob! That will allow us to assess strongly the element of performance! And we can look on improving it! As we have options to it! But only if it's that important!

laravel-mix depends on webpack! And it always consume resources! Specially if used with hot reloading! And changes keep going !

The watching overhead that laravel-mix-glob add is about watching the glob matching directories and for new added files or removal! (that includes renaming)! And only at that the whole laravel-mix is restarted! For the rest! laravel-mix-glob only save us the headache of writing the laravel-mix commands for each file one by one! The rest is completely on laravel-mix (webpack) and that include hot-reloading! For small directories and most project i guess the overhead of this watching is not important (benchmarking however is necessary to affirm for sure)! Here a thread that can give an insight!

Final thoughts! Webpack always consume resources! We can see that while working with multiple projects! Like when using react! ...! We need to assert about file watching and resources consumption (memory and cpu) (i bet the overhead is not a thing for normal projects)! And it's nice to compare using and not using laravel-mix-glob! My experience is that Laravel-mix alone and webpack globally always consume resources! I want to confirm about file watching!

Questions ?

  • How much RAM do you have! Or it's not a RAM problem !? (i my self at 12GO ram and find myself running out of memory)
  • From your experience! What about when you were using laravel-mix alone ?

For contribution i'm adding you as contributor (an invite was sent)! And feel free to what you see fit! And how we can improve things!
You may like to join me on telegram (I'm always reachable there)! I'll send you contact on your email!

@mertasan
Copy link
Collaborator Author

Thanks bro. Ok let's continue with e-mail.

@MohamedLamineAllal MohamedLamineAllal pinned this issue Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants