Skip to content

Instantly share code, notes, and snippets.

@swannodette
Last active August 29, 2015 14:13

Revisions

  1. swannodette revised this gist Jan 13, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@
    ;; explicit common.js

    {:optimizations :advanced
    :output-dir "./target/client/production/"
    :cache-analysis true
  2. swannodette revised this gist Jan 12, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    ;; explicit common.js

    {:optimizations :advanced
    :output-dir "../target/production/out"
    :output-dir "./target/client/production/"
    :cache-analysis true
    :output-modules {
    {:id :common
    :out "../../assets/js/common.js"
    :out "./resources/assets/js/common.js"
    :entries '#{com.foo.common}}
    {:id :landing
    :out "../../assets/js/landing.js"
    :out "./resources/assets/js/landing.js"
    :entries '#{com.foo.landing}
    :deps #{:common}
    {:id :editor
    :out "../../assets/js/editor.js"
    :out "./resources/assets/js/editor.js"
    :entries '#{com.foo.editor}
    :deps #{:common}}}}}
  3. swannodette revised this gist Jan 12, 2015. 1 changed file with 15 additions and 17 deletions.
    32 changes: 15 additions & 17 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,17 @@
    ;; explicit common.js

    {:id "production"
    :source-paths ["src/cljs"]
    :compiler
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    {:id :common
    :out "../../assets/js/common.js"
    :entries '#{com.foo.common}}
    {:id :landing
    :out "../../assets/js/landing.js"
    :entries '#{com.foo.landing}
    :deps #{:common}
    {:id :editor
    :out "../../assets/js/editor.js"
    :entries '#{com.foo.editor}
    :deps #{:common}}}}}}
    {:optimizations :advanced
    :output-dir "../target/production/out"
    :cache-analysis true
    :output-modules {
    {:id :common
    :out "../../assets/js/common.js"
    :entries '#{com.foo.common}}
    {:id :landing
    :out "../../assets/js/landing.js"
    :entries '#{com.foo.landing}
    :deps #{:common}
    {:id :editor
    :out "../../assets/js/editor.js"
    :entries '#{com.foo.editor}
    :deps #{:common}}}}}
  4. swannodette revised this gist Jan 12, 2015. 1 changed file with 11 additions and 15 deletions.
    26 changes: 11 additions & 15 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -6,18 +6,14 @@
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common} ;; common.js definition is optional
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}

    ;; automatic common module computation

    {:id "production"
    :source-paths ["src/cljs"]
    :compiler
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/shared.js" :common ;; support arbitrary naming of common module
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
    {:id :common
    :out "../../assets/js/common.js"
    :entries '#{com.foo.common}}
    {:id :landing
    :out "../../assets/js/landing.js"
    :entries '#{com.foo.landing}
    :deps #{:common}
    {:id :editor
    :out "../../assets/js/editor.js"
    :entries '#{com.foo.editor}
    :deps #{:common}}}}}}
  5. swannodette revised this gist Jan 12, 2015. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    ;; explicit common.js

    {:id "production"
    :source-paths ["src/cljs"]
    :compiler
    @@ -6,4 +8,16 @@
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common} ;; common.js definition is optional
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}

    ;; automatic common module computation

    {:id "production"
    :source-paths ["src/cljs"]
    :compiler
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/shared.js" :common ;; support arbitrary naming of common module
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
  6. swannodette revised this gist Jan 12, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common} ;; common.js definition is optional
    "../../assets/js/landing.js" '#{com.foo.landing.*}
    "../../assets/js/editor.js" '#{com.foo.editor.*}}}}
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
  7. swannodette revised this gist Jan 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common.*} ;; common.js definition is optional
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common} ;; common.js definition is optional
    "../../assets/js/landing.js" '#{com.foo.landing.*}
    "../../assets/js/editor.js" '#{com.foo.editor.*}}}}
  8. swannodette revised this gist Jan 12, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
    "../../assets/js/common.js" '#{cljs.core.* com.foo.common.*} ;; common.js definition is optional
    "../../assets/js/landing.js" '#{com.foo.landing.*}
    "../../assets/js/editor.js" '#{com.foo.editor.*}}}}
  9. swannodette revised this gist Jan 12, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    {:id "my-app"
    {:id "production"
    :source-paths ["src/cljs"]
    :compiler
    {:optimizations :advanced
  10. swannodette revised this gist Jan 12, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
  11. swannodette revised this gist Jan 12, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
    "../../assets/js/editor.js" '#{com.foo.editor}
    "../../assets/js/landing.js" '#{com.foo.landing}}}}
    "../../assets/js/landing.js" '#{com.foo.landing}
    "../../assets/js/editor.js" '#{com.foo.editor}}}}
  12. swannodette revised this gist Jan 11, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    {:id "csp-dev"
    :source-paths ["src/blog/csp" "src/blog/utils"]
    {:id "my-app"
    :source-paths ["src/cljs"]
    :compiler
    {:optimizations :whitespace
    {:optimizations :advanced
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
  13. swannodette created this gist Jan 11, 2015.
    9 changes: 9 additions & 0 deletions cljs_modules.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    {:id "csp-dev"
    :source-paths ["src/blog/csp" "src/blog/utils"]
    :compiler
    {:optimizations :whitespace
    :pretty-print false
    :output-modules {
    "../../assets/js/common.js" '#{cljs.core com.foo.common}
    "../../assets/js/editor.js" '#{com.foo.editor}
    "../../assets/js/landing.js" '#{com.foo.landing}}}}