kbrsh / moon

🌙 The minimal & fast library for functional user interfaces
https://moonjs.org
MIT License
6k stars 200 forks source link

Great Work! #235

Closed vitaly-t closed 6 years ago

vitaly-t commented 6 years ago

This is a very interesting solution, though I feel robbed - it promised a 3Kb after compression, and it's actually whole 8kb :smile:

I found this library while having started on my own version of a mini-DOM framework. No worries, it is very different from what you do here , I'm just looking to steal some ideas for running tests :smile:

kbrsh commented 6 years ago

Thanks! It’s actually 3kb minified and gzipped. I’m still working on tests for the beta since there are still a couple of changes I need to make.

vitaly-t commented 6 years ago

I know, I was just joking :) I'm working hard on my framework too, only I got stuck trying with automated tests, trying to find a good way to test DOM modifications. Tests sometimes can be a real bummer.

vitaly-t commented 6 years ago

It would be nice to share some experience writing things like that ;) Just so, once again, yours is a mini UI framework, while mine is a mini DOM manipulator, so quite different things ;)

By any chance did you come across any issues exporting the library's root interface? Or did you use the current approach from the beginning? I'm using the stupid window for now, which has issues in the IE, and wonder what should be a better way...

kbrsh commented 6 years ago

I used the current approach — it’s very popular and is used in many other libraries. I’d recommend using Rollup to package your library and check out the various output options that export to different environments automatically.

vitaly-t commented 6 years ago

Thank you for the suggestions! :smile: I'm not sure if I will use the Rollup yet, since my library is even smaller than yours, and currently sits in just one single file.

And I was able to sort out the IE-related issues related to global variables. I found out the hard way that if you include a script as <script src="../src">, only IE failed to load the default index.js, it requires the full <script src="../src/index.js">, dumb browser! :smile:

kbrsh commented 6 years ago

Haha IE can be a hassle ;)

Let's continue this discussion over email (available on my site) as I don't want to use issues for discussions like these.

vitaly-t commented 6 years ago

@kbrsh Yep, thank you! I have also added chat to the project, and I appreciate if you offer an opinion and/or help with anything. Cheers!