You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATTENTION: less4j is not maintained and only targets Less ~1.3-1.4. Consider using Less.js if you do not need to read LESS files from the Java classpath.
Features
Load imports directly from Java classpath (e.g. Webjars)
Add dependency [org.webjars.bower/bootstrap "3.3.6"] to use Bootstrap
Boot
Provides the less task (deraen.boot-less/less)
Select main files using inputs option
or, for each .main.less file in the fileset creates equivalent .css file.
Check boot less --help for task options.
Leiningen
Provides the less4clj task
Select main files using inputs option
or, for each .main.less file in source-dirs creates equivalent .css file.
Resource META-INF/resources/webjars/{package}/{version}/{path} can be referred using {package}/{path}
For example @import "bootstrap/less/bootstrap.less"; will import META-INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less
FAQ
Shadow-cljs integration
Check the example from sass4clj, it should work with less4clj also.
Semantic-UI theme.config
Semantic-UI needs theme.config
file in your project. Add this file to your classpath under path META-INF/resources/webjars/semantic-ui/2.2.10/src/theme.config, e.g under resources/ folder.
Log configuration
If you don't have any slf4j implementations, you will see a warning:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
To disable this, add a no operation logger to your project. As this is only required
on the build phase, you can use :scope "test" so that the dependency is not
transitive and is not included in Uberjar. Alternatively, you can add this
dependency to your Leiningen dev profile.