That's a very good point.  The overhead of all the closure library stuff
and CLJS code is much more than my client code.  That's a great idea....


--
Jonathon McKitrick

On Tue, Sep 9, 2014 at 11:05 AM, Gary Trakhman <[email protected]>
wrote:

> Well, one cached possibly-larger file vs 6 slightly smaller ones.
>
> On Tue, Sep 9, 2014 at 11:04 AM, Jonathon McKitrick <[email protected]>
> wrote:
>
>> I guess that could be done, and yes, it does deal with code duplication.
>> I guess with optimizations on, there's no reason to worry about code size?
>>
>>
>> --
>> Jonathon McKitrick
>>
>> On Tue, Sep 9, 2014 at 10:12 AM, Gary Trakhman <[email protected]>
>> wrote:
>>
>>> Maybe this is a stupid question, but why not share a single JS file
>>> across everything + have multiple entry-points?  Seems like you'd want to
>>> share _some_ code between the pages anyway.
>>>
>>> On Tue, Sep 9, 2014 at 10:03 AM, Jonathon McKitrick <
>>> [email protected]> wrote:
>>>
>>>> Well, it's several destination .js files, basically.  And I also would
>>>> like separate cljs-build profiles for different compiler settings.
>>>>
>>>> I'm learning my way around cljs-build, and this is my next goal.
>>>>
>>>>
>>>> --
>>>> Jonathon McKitrick
>>>>
>>>> On Tue, Sep 9, 2014 at 9:12 AM, Zubair Quraishi <[email protected]>
>>>> wrote:
>>>>
>>>>> Sorry, seems like I misunderstood. You have several projects in one
>>>>> file, not several profiles, is that correct?
>>>>>
>>>>>
>>>>> 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 a topic in the
>>>>> Google Groups "ClojureScript" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/clojurescript/FzEJoy4yAK0/unsubscribe
>>>>> .
>>>>> To unsubscribe from this group and all its topics, 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.
>>>>>
>>>>
>>>>  --
>>>> 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.
>>>>
>>>
>>>  --
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "ClojureScript" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/clojurescript/FzEJoy4yAK0/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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.
>>>
>>
>>  --
>> 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.
>>
>
>  --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojurescript/FzEJoy4yAK0/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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.

Reply via email to