diff --git a/CHANGES.md b/CHANGES.md index 4d51ea8..124c0fa 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,15 @@ +# 0.2.6 Further NPM support for the new :bundle target + +Got extra-mains and auto-testing up and running along with a new +intial docs page https://figwheel.org/docs/npm.html to help get +started with an NPM based ClojureScript project. + +* Added templating to `:bundle-cmd` cljs option: it interpolates `:output-to` and `:final-output-to` +* `:bundle-cmd` only bundles one time when watching and compiling +* set the fighweel option `:bundle-once` to `false` to have bundling occur on every compile +* set the fighweel option `:final-output-to` if you don't want the default of `:output-to` + "_bundle" +* logs the bundle command when it runs for easier debugging + # 0.2.5 Much better NPM support with new CLJS :bundle target > support for the new :bundle target requires clojurescript >= 1.10.764 diff --git a/README.md b/README.md index ba92331..5b4056d 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ On Mac OSX with brew: Now launch a ClojureScript REPL with: ``` -clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.5\"}}}}" -m figwheel.main +clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.6\"}}}}" -m figwheel.main ``` This will first compile browser REPL code to a temp directory, and @@ -224,7 +224,7 @@ available. So, you can get Rebel Readline behavior by simply adding it to your dependencies. ``` -clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.5\"} com.bhauman/rebel-readline-cljs {:mvn/version \"0.1.4\"}}}}" -m figwheel.main +clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.6\"} com.bhauman/rebel-readline-cljs {:mvn/version \"0.1.4\"}}}}" -m figwheel.main ``` As of right now using Rebel readline does create some startup overhead @@ -245,7 +245,7 @@ directory of your project. Ensure your `deps.edn` file has the `figwheel.main` dependencies: ```clojure -{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.5"} +{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.6"} com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}} ;; setup some development paths :paths ["src" "target" "resources"] @@ -311,7 +311,7 @@ directory of your project. Ensure your `project.clj` file has `figwheel.main` dependencies: ```clojure -:dependencies [[com.bhauman/figwheel-main "0.2.5"] +:dependencies [[com.bhauman/figwheel-main "0.2.6"] [com.bhauman/rebel-readline-cljs "0.1.4"]] ;; setup target as a resource path :resource-paths ["target" "resources"] @@ -449,7 +449,7 @@ ClojureScript searches for source files on the Classpath. When you add a `re-frame` dependency like so: ```clojure -{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.5"} +{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.6"} com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"} ;; adding re-frame re-frame {:mvn/version "1.10.5"}} diff --git a/deps.edn b/deps.edn index cb4f769..8209319 100644 --- a/deps.edn +++ b/deps.edn @@ -4,8 +4,8 @@ ;; DEV for now its easier to use cider with top level deps ;; com.bhauman/figwheel-core {:local/root "/Users/bhauman/workspace/figwheel/figwheel-core"} ;; com.bhauman/figwheel-repl {:local/root "/Users/bhauman/workspace/figwheel/figwheel-repl"} - com.bhauman/figwheel-repl {:mvn/version "0.2.6-SNAPSHOT"} - com.bhauman/figwheel-core {:mvn/version "0.2.6-SNAPSHOT"} + com.bhauman/figwheel-repl {:mvn/version "0.2.6"} + com.bhauman/figwheel-core {:mvn/version "0.2.6"} ;; server ring {:mvn/version "1.7.1"} diff --git a/docs/README.md b/docs/README.md index ba92331..5b4056d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -200,7 +200,7 @@ On Mac OSX with brew: Now launch a ClojureScript REPL with: ``` -clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.5\"}}}}" -m figwheel.main +clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.6\"}}}}" -m figwheel.main ``` This will first compile browser REPL code to a temp directory, and @@ -224,7 +224,7 @@ available. So, you can get Rebel Readline behavior by simply adding it to your dependencies. ``` -clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.5\"} com.bhauman/rebel-readline-cljs {:mvn/version \"0.1.4\"}}}}" -m figwheel.main +clojure -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.2.6\"} com.bhauman/rebel-readline-cljs {:mvn/version \"0.1.4\"}}}}" -m figwheel.main ``` As of right now using Rebel readline does create some startup overhead @@ -245,7 +245,7 @@ directory of your project. Ensure your `deps.edn` file has the `figwheel.main` dependencies: ```clojure -{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.5"} +{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.6"} com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}} ;; setup some development paths :paths ["src" "target" "resources"] @@ -311,7 +311,7 @@ directory of your project. Ensure your `project.clj` file has `figwheel.main` dependencies: ```clojure -:dependencies [[com.bhauman/figwheel-main "0.2.5"] +:dependencies [[com.bhauman/figwheel-main "0.2.6"] [com.bhauman/rebel-readline-cljs "0.1.4"]] ;; setup target as a resource path :resource-paths ["target" "resources"] @@ -449,7 +449,7 @@ ClojureScript searches for source files on the Classpath. When you add a `re-frame` dependency like so: ```clojure -{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.5"} +{:deps {com.bhauman/figwheel-main {:mvn/version "0.2.6"} com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"} ;; adding re-frame re-frame {:mvn/version "1.10.5"}} diff --git a/docs/assets/compiled/js/main.js b/docs/assets/compiled/js/main.js index 24376c8..a77e903 100644 --- a/docs/assets/compiled/js/main.js +++ b/docs/assets/compiled/js/main.js @@ -146,8 +146,8 @@ H(p);var q=M(p);if(null==q)return a.Y?a.Y(b,c,d,e,g,f,k,l,m,n):a.call(a,b,c,d,e, l,m,n,p,q,r,t);u=H(v);var x=M(v);if(null==x)return a.ca?a.ca(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u);v=H(x);var A=M(x);if(null==A)return a.da?a.da(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v);x=H(A);var G=M(A);if(null==G)return a.ea?a.ea(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x);A=H(G);var R=M(G);if(null==R)return a.fa?a.fa(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v, x,A);G=H(R);var ja=M(R);if(null==ja)return a.ga?a.ga(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A,G):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A,G);R=H(ja);ja=M(ja);if(null==ja)return a.ha?a.ha(b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A,G,R):a.call(a,b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A,G,R);b=[b,c,d,e,g,f,k,l,m,n,p,q,r,t,u,v,x,A,G,R];for(c=ja;;)if(c)b.push(H(c)),c=M(c);else break;return a.apply(a,b)} function xf(a,b){if(a.V){var c=a.S,d=pf(c+1,b);return d<=c?sf(a,d,b):a.V(b)}b=K(b);return null==b?a.A?a.A():a.call(a):tf(a,H(b),M(b))}function yf(a,b,c){return kc.V?(a=Ce(a,Ce(b,c)),b=kc.S,c=2+pf(b-1,c),c<=b?sf(kc,c,a):kc.V(a)):uf(kc,a,b,K(c))}function Me(a,b,c,d,e,f){return a.V?(f=qf(f),b=Ce(b,Ce(c,Ce(d,Ce(e,f)))),c=a.S,f=4+pf(c-3,f),f<=c?sf(a,f,b):a.V(b)):wf(a,b,c,d,e,qf(f))} -function zf(){if("undefined"===typeof Kc||"undefined"===typeof Lc||"undefined"===typeof Mc)Mc=function(a){this.Ac=a;this.i=393216;this.v=0},Mc.prototype.R=function(a,b){return new Mc(b)},Mc.prototype.M=function(){return this.Ac},Mc.prototype.ua=function(){return!1},Mc.prototype.next=function(){return Error("No such element")},Mc.prototype.remove=function(){return Error("Unsupported operation")},Mc.Tc=function(){return new Af(null,1,5,Bf,[Cf],null)},Mc.Tb=!0,Mc.tb="cljs.core/t_cljs$core10178",Mc.vc= -function(a){return xd(a,"cljs.core/t_cljs$core10178")};return new Mc(Df)}function Ef(a,b){for(;;){if(null==K(b))return!0;var c=L(b);c=a.a?a.a(c):a.call(null,c);if(B(c))b=M(b);else return!1}}function Ff(a){this.state=a;this.ac=this.Hc=this.o=null;this.v=16386;this.i=6455296}h=Ff.prototype;h.equiv=function(a){return this.s(null,a)};h.s=function(a,b){return this===b};h.Eb=function(){return this.state};h.M=function(){return this.o}; +function zf(){if("undefined"===typeof Kc||"undefined"===typeof Lc||"undefined"===typeof Mc)Mc=function(a){this.Ac=a;this.i=393216;this.v=0},Mc.prototype.R=function(a,b){return new Mc(b)},Mc.prototype.M=function(){return this.Ac},Mc.prototype.ua=function(){return!1},Mc.prototype.next=function(){return Error("No such element")},Mc.prototype.remove=function(){return Error("Unsupported operation")},Mc.Tc=function(){return new Af(null,1,5,Bf,[Cf],null)},Mc.Tb=!0,Mc.tb="cljs.core/t_cljs$core10184",Mc.vc= +function(a){return xd(a,"cljs.core/t_cljs$core10184")};return new Mc(Df)}function Ef(a,b){for(;;){if(null==K(b))return!0;var c=L(b);c=a.a?a.a(c):a.call(null,c);if(B(c))b=M(b);else return!1}}function Ff(a){this.state=a;this.ac=this.Hc=this.o=null;this.v=16386;this.i=6455296}h=Ff.prototype;h.equiv=function(a){return this.s(null,a)};h.s=function(a,b){return this===b};h.Eb=function(){return this.state};h.M=function(){return this.o}; h.Rb=function(a,b,c){a=K(this.ac);for(var d=null,e=0,f=0;;)if(fdeps.edn

If don’t have a deps.edn file let’s create one now:

-
{:deps  {com.bhauman/figwheel-main {:mvn/version "0.2.5"}
+  
{:deps  {com.bhauman/figwheel-main {:mvn/version "0.2.6"}
          ;; add rebel-readline for advanced REPL readline editing
          com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
  :paths ["src" "target" "resources"]}
diff --git a/helper-resources/public/com/bhauman/figwheel/helper/content/creating_a_build_lein.html b/helper-resources/public/com/bhauman/figwheel/helper/content/creating_a_build_lein.html
index e38aa78..6365799 100644
--- a/helper-resources/public/com/bhauman/figwheel/helper/content/creating_a_build_lein.html
+++ b/helper-resources/public/com/bhauman/figwheel/helper/content/creating_a_build_lein.html
@@ -22,7 +22,7 @@ 

project.clj

(defproject lein-main "0.1.0-SNAPSHOT"
   :profiles {:dev {:dependencies
-                   [[com.bhauman/figwheel-main "0.2.5"]
+                   [[com.bhauman/figwheel-main "0.2.6"]
                     [com.bhauman/rebel-readline-cljs "0.1.4"]]}}
   :aliases {"fig" ["trampoline" "run" "-m" "figwheel.main"]})
 
diff --git a/project.clj b/project.clj index 707b70b..dc3ba57 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject com.bhauman/figwheel-main "0.2.6-SNAPSHOT" +(defproject com.bhauman/figwheel-main "0.2.6" :description "Figwheel Main - Clojurescript tooling." :url "https://github.com/bhauman/figwheel-main" :license {:name "Eclipse Public License - v 1.0" @@ -8,8 +8,8 @@ :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.339" :exclusions [commons-codec]] - [com.bhauman/figwheel-repl "0.2.6-SNAPSHOT"] - [com.bhauman/figwheel-core "0.2.6-SNAPSHOT"] + [com.bhauman/figwheel-repl "0.2.6"] + [com.bhauman/figwheel-core "0.2.6"] [com.bhauman/spell-spec "0.1.1"] [com.bhauman/cljs-test-display "0.1.1"] [ring "1.7.1"]