Closed onetom closed 8 years ago
I would like to see this too. @martinklepsch how does CSS packaging work? Is it just a matter of including an .inc.css
file?
@bsima basically that's what you'd do. Since there is no mechanism that handles these .inc.css
files across different build tools it will be hard to support this.
I forgot to mention it here, that I actually packaged it for boot1 at least: http://github.com/exicon/hoplon-semantic-ui Might help to serve as a basis for boot2
The extra work with it was producing the externs file really.
Maybe it's an option to separately mark packages that contain other assets or put them into another repo? I'm definitely open to having this as part as CLJSJS but I also don't want to confuse people that expect these packages to just work out-of-the-box.
Maybe there could be a cljsjs/semantic-ui-js
and cljsjs/semantic-ui-css
and the latter could be wrapped in a call to boot-less
?
(IIRC, Semantic writes all of its source files in less.)
@bsima I may be wrong, but from using boot-less I believe that you should be able to simply create your own <whatever>.main.less
file for your application which @imports semantic-ui less or css files that would be contained in a jar (eg, if cljsjs packaged it, something like 'cljsjs/semantic_ui/common/less/semantic.css' or whatever).
I'm thinking about giving this a go. I will try to package up semantic's JS as well as both its CSS and Less files, so that one could use their suggested workflow, compiling Less incrementally while adjusting variables, toggling themes, etc. I'll report back.
boot-less support would be awesome obviously, especially if it could integrate the site variables from the including project for theming. I hope the less compilation is incremental too and also fast enough not to add even more to the abysmal startup time...
For the record, https://github.com/exicon/hoplon-semantic-ui has a boot2 build script for packaging. There is a boot2 branch which can successfully package for Hoplon6 and the master branch can package it for Hoplon5.
I use semantic-ui a lot in my ClojureScript projects — but I am unclear on what kind of packaging we are talking about. SemanticUI is mostly useful when you integrate it into the build process: you are supposed to customize it, pick the modules that you really use and use gulp to build a smaller, customized package.
Just including the full default SemanticUI installation is nice for development (gives a really quick start), but doesn't buy much in the long term.
@jwr We are using it with Hoplon via the Boot build tool. This is how our homepage uses it: https://github.com/exicon/homepage/blob/master/build.boot
We also plan to replace the default javascript implementation for the various widgets with a Hoplon implementation, since it allows proper encapsulation using Javelin cells. That's why our project is named specifically hoplon-semantic-ui.
@onetom I'm loving your hoplon-semantic-ui project. I've got a Hoplon project to work on this/next week and I'm trying to decide between using custom styles in garden or using Semantic UI. Have you considered using garden with semantic?
@bsima garden was discussed on the #hoplon IRC channel and there is even a boot task for it. We have very few custom styles on top of the vanilla Semantic UI, so we don't feel the need for anything better yet. What we expect to happen though is the need for a customized Semantic UI will arise and then we have to compile it with our set of site variables. To do that we would need boot-less.
@onetom I've considered doing the same thing here. Right now I'm not using any css "framework" but I really like Semantic. I'll work on this over this week, and report back in this thread. It may be that Semantic can be packaged as its own boot task (boot-semantic-ui, for example) compiled with boot-less, instead of served with cljsjs.
Merged and deployed.
[02:58am] michaniskin: onetom: if you want you can post issues on the cljsjs repo with packages you'd like to see [02:58am] michaniskin: and we can do them as we get around to it [02:59am] michaniskin: of course pull requests are also welcome :)
So here it goes. I wish it would be packaged up, because we are already using it in 3 different repos and now we have to upgrade them to the latest version too, so it would be great to have it packaged.