Curious to know whether anyone has successfully built a CLJS workflow for using CSS Modules within Clojurescript:
http://glenmaddern.com/articles/css-modules
It looks like a really solid way to write maintainable CSS, but I haven't been able to find any references to Clojure based workflows.
I'm specifically interested in understanding how one can include CSS modules within CLJS where we don't have a bundle tool like Browserify to also process the CLJS file itself.
I'm thinking about using something like Gulp to build and watch my css files, outputting a bundle which I can then reference within my CLJS file - but not sure whether that will work as the JS examples seem to "import" the CSS modules directly in order to get the references to the style names.
Will give it a go and see where I get, but any thoughts would be appreciated.
Good news - I managed to get this working using a Gulp/Browserify compile process which builds a CommonJS module that is consumed by my CLJS project (using foreign-libs). I can then use the generated CSS Module class names within my CLJS files. It works with live-reloading through figwheel too, so quite happy.
There were a few quirks with getting it all working, so If anyone is interested, I can clean up the code and create a sample GitHub project.
On Nov 7, 2015, at 10:21 AM, Dhruv Bhatia <dh...@dhruvbhatia.com> wrote:There were a few quirks with getting it all working, so If anyone is interested, I can clean up the code and create a sample GitHub project.