Re: [ClojureScript] Re: Any chance we can fit ClojureScript into Webpack ecosystem?
> I'll probably write the simple version today and see how things work out. So the simple version sort of works. http://thheller.com/webpack-cljs-preview/index.html http://thheller.com/webpack-cljs-preview/bundle.js This was generated by "webpack -d" and index.js: --- var foo = require("webpack-cljs/dummy.foo"); console.log(foo.bar()); --- dummy/foo.cljs: --- (ns dummy.foo) (js/console.log "dummy.foo") (defn bar [] "bar") --- Nothing special but works well enough, still haven't figured out most of the webpack things though. Currently they shadow-devtools just runs independently and generates files into ./node_modules/webpack-cljs/dummy.foo.js to make the require "pretty" (I really do not like relative paths). Will polish things a bit and maybe provide a public repo tomorrow. Still convinced that this is a very bad idea though. ;) -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
[ClojureScript] Large public clojurescript websites
Hi, I recently deployed a 100% cljs/cls site: organicinvestmentcooperative.com.au I'm wondering if people can point me towards other clojurescript websites, or people or resources to help build commercial scale websites in clojurescript Feels like there is a lot of potential here, but lack of front end libraries is causing more development work compared to more mainsteam technologies Thanks! Marc -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.
Re: [ClojureScript] Re: Any chance we can fit ClojureScript into Webpack ecosystem?
On Saturday, May 13, 2017 at 3:47:01 AM UTC+2, Jiyin Yiyong wrote: > Cool Hope one day it's in Lumo too XD Not by me but the features could certainly be ported. I spent quite a bit of time yesterday fighting through webpack sources trying to come up with an efficient way of doing things. The easy solution would be to make everything one-way which means JS can require CLJS but CLJS cannot require "local" JS, only modules from npm. So (js/require "react") would work but (js/require "./foo") would not. So in JS you would could say var x = require("webpack-cljs/cljs.core"). The way things are handled in webpack/npm means you must have a module-name which would be webpack-cljs or something along that line. But a package cannot depend on the local sources. Having sources to actually be side-by-side doesn't mirror too well to JS since you usually don't have namespaces there. Imagine src/index.js src/foo.js src-cljs/foo/bar.cljs In index.js you could say require("./webpack-cljs/foo.bar") and in the cljs file I could imagine (webpack/require "./foo") where it would always be relative context root (ie. src). The compiler would actually just generated a src/webpack-cljs/foo.bar.js. Same way it would for the module version. The problem with that is that people may start writing npm packages in CLJS where each package would contain its own version of cljs.core. That would be really really bad. Ideally I want src/index.js src/foo.js src/foo/bar.cljs but have not figured out how to do that yet. webpack has a ton of mutable state all over the place so trying to figure out what is going on is not that easy. I'll probably write the simple version today and see how things work out. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at https://groups.google.com/group/clojurescript.