-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Milestone
Description
Most of my projects using cljx end up with a configuration similar to:
:source-paths ["src" "target/generated-src"]
:test-paths ["test" "target/generated-test"]
:cljsbuild {:builds [{:source-paths ["src" "target/generated-src"]}]}
:cljx {:builds [{:source-paths ["src"]
:output-path "target/generated-src"
:rules :clj}
{:source-paths ["src"]
:output-path "target/generated-src"
:rules :cljs}
{:source-paths ["test"]
:output-path "target/generated-test"
:rules :clj}
{:source-paths ["test"]
:output-path "target/generated-test"
:rules :cljs}]}
Note that the cljx
configuration has some implications on source-paths
, test-paths
and cljsbuild
.
Most of it could be deduced and injected at run time (by a leiningen plugin). The configuration could be simplified down to:
:cljx {:builds [{:source-paths ["src" "test"]
:output-path "target/generated-%"
:rules [:clj :cljs]}]}
This is similar to this proposition for clojurescript.test
.
The whole configuration could be omitted with some default:
source-paths
is the concatenation ofsource-paths
andtest-paths
output-path
has some defaultrules
defaults to[:clj :cljs]
Now this is probably too much (and assumes cljx
files are in the same directory structures than clj
files, which I usually do).
Metadata
Metadata
Assignees
Labels
No labels