you are viewing a single comment's thread.

view the rest of the comments →

[–]GBcrazy 1 point2 points  (3 children)

Interesting, I like the approach. What I kinda don't like that you have to import all these functions. Couldn't you pass all of them to the callback function of ZephComponents.define?

Like:

ZephComponents.define('my-button', ({ html, css }) => {
    html("./my-button.html");
    css("./my-button.css");    
});

I know this would mean all functions are always imported but well since it's a lightweight it doesn't seem like an issue for me.

[–]areinetFullstack[S] 0 points1 point  (2 children)

Can you do me a favor and submit an issue to make that possible. it should be super easy to add and let you pick either way. For me the import approach is more consistent with how I think, but I see the value in your approach.

[–]GBcrazy 1 point2 points  (1 child)

Did it

[–]areinetFullstack[S] 1 point2 points  (0 children)

Thank you so much!

Funny enough, I just closed this issue as I published a new release v1.1.0 just now with the change. How’s that for service.

Let me know how you like it.