Skip to content
This repository was archived by the owner on Oct 8, 2020. It is now read-only.

Allow src-paths to refer to individual less files#16

Open
bbbates wants to merge 2 commits into
montoux:masterfrom
bbbates:master
Open

Allow src-paths to refer to individual less files#16
bbbates wants to merge 2 commits into
montoux:masterfrom
bbbates:master

Conversation

@bbbates

@bbbates bbbates commented Jun 14, 2015

Copy link
Copy Markdown

It can be useful to ensure that only a single less file (usually a "root" less file that contains a large amount of @imports) is compiled, rather than all less files in a path and it's descendents.

This can actually be a workaround for #9 (that @tangrammer eluded to); instead of having the bootstrap less failures fail the build, only build a single (or multiple) "root" less files like thus:

src/less/my-css.less:

@import bootstrap/bootstrap.less
@import some-other-file.less

project.clj

  :less {:source-paths ["src/less/my-css.less"]
           :target-path "resources/public/css"}

I also added a change to ensure that the auto task watches the parent directory of any less files specified in src-paths - which isn't ideal, but will at least force a recompile of the src less file if something changes thats likely to affect the file.

@jacobemcken

Copy link
Copy Markdown

I noticed that if I prefixed the name with an _ (underscore), then the Less files wouldn't be compiled into CSS files. That might be another possible workaround... at least it was for me.

@leonfs

leonfs commented Apr 8, 2016

Copy link
Copy Markdown

The underscore trick worked for me too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants