status-im / pluto

https://status-im.github.io/pluto/
12 stars 3 forks source link

Proof of Concept for browser-compatibility #116

Closed tpscrpt closed 5 years ago

tpscrpt commented 5 years ago

Closing #115 in continuation of #90

I think I'm on the right path. Currently, it would be very easy to build sites with the pluto suite for browsers when having access to html lein cljsbuild pluto.browser` and `<script src="target-cljs/cljsbuild/pluto.browser.js"></script>.

I would like to take another route, I believe doing a NodeJS-first build and browserifying that is much easier compared to the other way around.

There seems to be drop-in replacement support when using :target nodejs && :npm-deps (instead of :foreign-libs).

@jeluard

tpscrpt commented 5 years ago

My goal is to finish this tomorrow. I will:

The maintainers will be charged of running lein cljsbuild once pluto.(nodejs|browser), then npm publish. Alternatively I can make npm publish do the lein cljsbild steps.

I'm also looking for more advice and requests from the maintainer.

jeluard commented 5 years ago

@JeremiGendron Sorry I didn't mentioned that earlier but we already have some browser support. See how it's compiled to JS here: https://github.com/status-im/pluto/blob/master/scripts/publish.sh#L1 BTW we don't used lein directly, it is just a leftover necessary for tooling integration.

So what I was thinking when creating this ticket was:

Sorry for the confusion!

tpscrpt commented 5 years ago

117

jeluard commented 5 years ago

@JeremiGendron You can update your branch and force push, no need to recreate PRs each time :)