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

Clojurescript support #127

Open
EwenG opened this issue Jan 23, 2016 · 9 comments
Open

Clojurescript support #127

EwenG opened this issue Jan 23, 2016 · 9 comments

Comments

@EwenG
Copy link

EwenG commented Jan 23, 2016

Hi,
I made a cljc version of hiccup: https://github.com/eweng/hiccup
Would you be interested by a pull request? In such a case I would wait for #122 to be merged, rebase on it and submit my changes.

@weavejester
Copy link
Owner

I would be interested, but ClojureScript might not be easy to get working.

I think the first step might be to splitting up the repository, since returning strings doesn't make sense in ClojureScript, not when most of the time you want a DOM element instead. You might even want a React element. So moving the utility functions out is step one, and work to that end has been started in the 2.0 branch.

Also there are a few parts of your code that are not really idiomatic anymore, like the -macros namespaces. In modern ClojureScript the macros namespace has the same name as the code namespace.

@EwenG
Copy link
Author

EwenG commented Jan 24, 2016

You are right, I renamed the "_macros" namespaces

@jeluard
Copy link

jeluard commented Jan 24, 2017

Having a ClojureScript port of hiccup (returning string) still makes sense as it could be used with nodejs. It can also be useful browser side: for simple static document going full virtual dom is not necessary.

Is this something you would consider? I can definitively help here.

@iku000888
Copy link
Contributor

iku000888 commented May 10, 2017

Just throwing in my 2 cents that a ClojureScript hiccup returning strings would make sense, and a separate fn/macro to return raw doms would also make sense. Even more awesome if they can be handled with the hiccup 2 goodness.

For reference,
https://github.com/ibdknox/crate returns raw doms from hiccup data.

@arichiardi
Copy link

Adding one more interested voice here, I feel that working with hiccup is better in node for certain use cases. I would add that we could have a hiccup-cljs version that is compatible with lumo & planck. I tried ewen/hiccup and it is not compatible at the moment, but I can push a PR to it in order to fix that.

@manuel-uberti
Copy link

Anything new here? Another interested voice. :)

@gklijs
Copy link

gklijs commented Apr 25, 2018

I woud be interested as well, I now use https://github.com/teropa/hiccups to get the html as strings and turn them into nodes with closure, but would much rather user the same library client and serversite

@wbehrens-on-gh
Copy link

I would be interested, but ClojureScript might not be easy to get working.

I think the first step might be to splitting up the repository, since returning strings doesn't make sense in ClojureScript, not when most of the time you want a DOM element instead. You might even want a React element. So moving the utility functions out is step one, and work to that end has been started in the 2.0 branch.

Also there are a few parts of your code that are not really idiomatic anymore, like the -macros namespaces. In modern ClojureScript the macros namespace has the same name as the code namespace.

It appears the 2.0 branch hasn't received commits in quite some time, is it abandoned and are there still plans to want to support cljs?

@weavejester
Copy link
Owner

weavejester commented Apr 28, 2022

It's not abandoned; the alpha works fine, but I haven't worked out a good way of converting all the utility functions over, or even if it's useful to do so, which is why any further work has been delayed.

It may be worth releasing the alpha as a full release, and leaving the question of the utility functions for 2.1.

As for cljs, I don't have any plans to add it myself.

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

8 participants