You have it pretty much right, this is my project clj for Coils:
https://github.com/zubairq/coils/blob/master/project.clj
:profiles {
:dev
{
:source-paths ["src" "../srcdev"]
:cljsbuild
{
:builds
[
{
:source-paths ["src"]
:compiler {
:output-to "resources/public/main.js"
:optimizations :whitespace
:output-wrapper false
:externs
["resources/public/google_maps_api_v3_11.js"]
:pretty-print false
}
}
]
}
}
:base
{
:source-paths ["src"
"srcbase"
]
:cljsbuild
{
:builds
[
{
:source-paths ["src"]
:compiler {
:output-to "resources/public/main.js"
:optimizations :whitespace
:output-wrapper false
:externs
["resources/public/jquery-externs.js"
"resources/public/google_maps_api_v3_11.js"]
:pretty-print false
}
}
]
}
}
:test
{
:source-paths ["src" "../srctest"]
:cljsbuild
{
:builds
[
{
:source-paths ["src"]
:compiler {
:output-to "resources/public/main.js"
:optimizations :advanced
:output-wrapper false
:externs
["resources/public/jquery-externs.js"
"resources/public/google_maps_api_v3_11.js"
"resources/public/reactextern.js"]
:pretty-print false
:foreign-libs [{:file
"https://maps.googleapis.com/maps/api/js?sensor=false"
:provides ["google.maps"
"google.maps.MapTypeId"]}]
}
}
]
}
}
:prod
{
:source-paths ["src" "../srcprod"]
:cljsbuild
{
:builds
[
{
:source-paths ["src"]
:compiler {
:output-to "resources/public/main.js"
:optimizations :advanced
:output-wrapper false
:externs
["resources/public/jquery-externs.js"
"resources/public/google_maps_api_v3_11.js"
"resources/public/reactextern.js"]
:pretty-print false
:foreign-libs [{:file
"https://maps.googleapis.com/maps/api/js?sensor=false"
:provides ["google.maps"
"google.maps.MapTypeId"]}]
}
}
]
}
}
On Tuesday, September 9, 2014 12:21:05 PM UTC+2, Jonathon McKitrick wrote:
> I have about 6 pages with their own cljs code, and I'd also like to have dev,
> pre-prod, and prod compilation settings.
>
> What's the best way to organize the project file to do this?
>
> I currently have something like this:
>
> :cljsbuild {:builds
> {:outlines
> {:source-paths ["src/cljs/outlines"] ;;"test/cljs"
> :compiler {:output-to "resources/public/js/outlines.js"
> :optimizations :simple
> :pretty-print true
> :preamble ["reagent/react.js"]}}
> :speakers
> {:source-paths ["src/cljs/speakers"]
> :compiler {:output-to "resources/public/js/speakers.js"
> :optimizations :simple
> :pretty-print true
> :preamble ["reagent/react.js"]}}
> :outgoing
> {:source-paths ["src/cljs/outgoing"]
> :compiler {:output-to "resources/public/js/outgoing.js"
> :optimizations :simple
> :pretty-print true
> :preamble ["reagent/react.js"]}}
> :incoming
> {:source-paths ["src/cljs/incoming"]
> :compiler {:output-to "resources/public/js/incoming.js"
> :externs ["js/externs.js"]
> :optimizations :advanced
> :pretty-print false
> ;;:output-dir "resources/public/js"
> ;;:source-map "resources/public/js/incoming.js.map"
> :preamble ["jquery/jquery-2.1.1.min.js"
> "reagent/react.js"]}}
> :home
> {:source-paths ["src/cljs/home"]
> :compiler {:output-to "resources/public/js/home.js"
> :optimizations :simple
> :pretty-print true
> :preamble ["reagent/react.js"]}}
> :confirm
> {:source-paths ["src/cljs/confirm"]
> :compiler {:output-to "resources/public/js/confirm.js"
> :optimizations :simple
> :pretty-print true
> :preamble ["reagent/react.js"]}}
> #_:outlines-testing
> #_{:source-paths ["test/cljs" "src/cljs/outlines"]
> :compiler {:preamble ["jquery/jquery-2.1.1.min.js"
> "reagent/react.js"]
> :output-to
> "resources/public/js/outlines-testing.js"
> :optimizations :simple
> :pretty-print true}}}
> #_:test-commands #_{"outlines-testing"
> ["phantomjs" :runner "resources/polyfill.js"
> "resources/public/js/outlines-testing.js"]}}
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.