diff --git a/CHANGES.md b/CHANGES.md index 49cf1341..73840b59 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,42 @@ +## 0.5.14 Faster loading for complex dependency trees + +Figwheel inherited a topo sort algorithm from the CLJS compiler. It +turned out that this graph sorting algorithm missed a very important +optimization, which is fixed in this release. If you have project that +has a lot of namespaces and have experienced slower load times when +you change a file that is deeper in your dependency chain, you should +notice a big improvement when using this release. + +Added JavaScript environment hooks for tools like `re-natal` to +customize the websocket implementation and the script loading behavior. + +* improved topo-sort algorithm +* CLJS compile option: the `:entries` key is no longer required in the + `:modules` configs +* new `:repl-eval-timeout` allows you to increase or lower the + Figwheel REPL eval timeout as a top level config setting +* added `goog.global.FIGWHEEL_WEBSOCKET_CLASS` to allow one to + override or supply a websocket implementation for the figwheel + client +* added `goog.global.FIGWHEEL_IMPORT_SCRIPT` to allow one to override + or supply a function to the figwheel client, that is responsible for + loading a namespace into the JavaScript runtime. +* added two new namespaces that can be supplied the ClojureScript + compiler's `:preloads` option. + + The two namespaces are only different in that one set's up figwheel + while the other both sets up and starts figwheel. These are + currently meant to clean up how the figwheel client is injected into + the build. The next release of Figwheel will do away with generating + a small ClojureScript file to inject the Figwheel client into build. + - `figwheel.connect` which will take a configuration from + `:external-tooling` > `:figwheel/config` and supply a + `figwheel.connect/start` function which contains the supplied + config options. This function is exported so that it can be easily + called from JavaScript. + - `figwheel.preload` which simply calls the above `figwheel.connect/start` + function + ## 0.5.13 Small updates * remove the use of a deprecated Google Closure library function diff --git a/README.md b/README.md index 838125e1..3ce84d26 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ Then include `lein-figwheel` in the `:plugins` section of your project.clj. ```clojure -[lein-figwheel "0.5.13"] +[lein-figwheel "0.5.14"] ``` #### Configure your builds @@ -572,7 +572,7 @@ Figwheel has a Clojure that makes it easy to start, stop and control Figwheel from Clojure. In order for the following examples to work, you will need to have -`[figwheel-sidecar "0.5.13"]` in your dependencies. +`[figwheel-sidecar "0.5.14"]` in your dependencies. To start Figwheel from a script, you will need to require the `figwheel-sidecar.repl-api` and provide your build configuration to diff --git a/example/project.clj b/example/project.clj index b1490cec..a954dc11 100644 --- a/example/project.clj +++ b/example/project.clj @@ -22,7 +22,7 @@ :plugins [[lein-ring "0.8.13" :exclusions [org.clojure/clojure]] #_[lein-cljsbuild "1.1.2"] - [lein-figwheel "0.5.14-SNAPSHOT"] + [lein-figwheel "0.5.14"] #_[lein-npm "0.4.0"]] :node-dependencies [[source-map-support "0.2.8"] @@ -116,7 +116,7 @@ }}}} :profiles { :dev { :dependencies [[com.cemerick/piggieback "0.2.1"] - [figwheel-sidecar "0.5.14-SNAPSHOT"] + [figwheel-sidecar "0.5.14"] [org.clojure/tools.namespace "0.2.11"] [org.clojure/tools.nrepl "0.2.12"] [leiningen-core "2.6.1"]] diff --git a/plugin/project.clj b/plugin/project.clj index 3bf6b9a6..004aa58a 100644 --- a/plugin/project.clj +++ b/plugin/project.clj @@ -1,4 +1,4 @@ -(defproject lein-figwheel "0.5.14-SNAPSHOT" +(defproject lein-figwheel "0.5.14" :description "ClojureScript Autobuilder/Server which pushes changed files to the browser. This is the lein plugin." :url "https://github.com/bhauman/lein-figwheel" :license {:name "Eclipse Public License - v 1.0" diff --git a/plugin/src/leiningen/figwheel.clj b/plugin/src/leiningen/figwheel.clj index 33f6f2a8..77c52761 100644 --- a/plugin/src/leiningen/figwheel.clj +++ b/plugin/src/leiningen/figwheel.clj @@ -10,7 +10,7 @@ [leiningen.figwheel.fuzzy :as fuz] [simple-lein-profile-merge.core :as lm])) -(def _figwheel-version_ "0.5.14-SNAPSHOT") +(def _figwheel-version_ "0.5.14") (defn make-subproject [project paths-to-add] (with-meta diff --git a/sidecar/project.clj b/sidecar/project.clj index 5206800a..5fd7a7f8 100644 --- a/sidecar/project.clj +++ b/sidecar/project.clj @@ -1,4 +1,4 @@ -(defproject figwheel-sidecar "0.5.14-SNAPSHOT" +(defproject figwheel-sidecar "0.5.14" :description "ClojureScript Autobuilder/Server which pushes changed files to the browser." :url "https://github.com/bhauman/lein-figwheel" :license {:name "Eclipse Public License - v 1.0" @@ -23,7 +23,7 @@ [org.clojure/tools.reader org.clojure/clojure]] [clj-stacktrace "0.2.8"] - [figwheel "0.5.14-SNAPSHOT" + [figwheel "0.5.14" :exclusions [org.clojure/tools.reader]] [hawk "0.2.11" :exclusions [org.clojure/clojure]] diff --git a/sidecar/resources/compiled-utils/figwheel-helper-deploy.js b/sidecar/resources/compiled-utils/figwheel-helper-deploy.js index 0c530275..90ec5677 100644 --- a/sidecar/resources/compiled-utils/figwheel-helper-deploy.js +++ b/sidecar/resources/compiled-utils/figwheel-helper-deploy.js @@ -3695,7 +3695,7 @@ c.call(null);d[cljs.core.async.impl.ioc_helpers.USER_START_IDX]=a;return d}();re figwheel.client.heads_up.close_bad_compile_screen=function(){var a=document.getElementById("figwheelFailScreen");return cljs.core.truth_(a)?goog.dom.removeNode(a):null}; figwheel.client.heads_up.bad_compile_screen=function(){var a=goog.dom.getElementsByTagNameAndClass("body")[0];figwheel.client.heads_up.close_bad_compile_screen.call(null);return goog.dom.append(a,goog.dom.createDom("div",{id:"figwheelFailScreen",style:[cljs.core.str("background-color: rgba(24, 26, 38, 0.95);"),cljs.core.str("position: absolute;"),cljs.core.str("z-index: 9000;"),cljs.core.str("width: 100vw;"),cljs.core.str("height: 100vh;"),cljs.core.str("top: 0px; left: 0px;"),cljs.core.str("font-family: monospace")].join("")}, goog.dom.createDom("div",{"class":"message",style:[cljs.core.str("color: #FFF5DB;"),cljs.core.str("width: 100vw;"),cljs.core.str("margin: auto;"),cljs.core.str("margin-top: 10px;"),cljs.core.str("text-align: center; "),cljs.core.str("padding: 2px 0px;"),cljs.core.str("font-size: 13px;"),cljs.core.str("position: relative")].join("")},goog.dom.createDom("a",{onclick:function(a){return function(a){a.preventDefault();return figwheel.client.heads_up.close_bad_compile_screen.call(null)}}(a),href:"javascript:", -style:"position: absolute; right: 10px; top: 10px; color: #666"},"X"),goog.dom.createDom("h2",{style:"color: #FFF5DB"},"Figwheel Says: Your code didn't compile."),goog.dom.createDom("div",{style:"font-size: 12px"},goog.dom.createDom("p",{style:"color: #D07D7D;"},"Keep trying. This page will auto-refresh when your code compiles successfully.")))))};figwheel.client._figwheel_version_="0.5.14-SNAPSHOT";figwheel.client.js_stringify="undefined"!==typeof JSON&&cljs.core.some_QMARK_.call(null,JSON.stringify)?function(a){return[cljs.core.str("#js "),cljs.core.str(JSON.stringify(a,null," "))].join("")}:function(a){try{return""+cljs.core.str(a)}catch(b){if(b instanceof Error)return"Error: Unable to stringify";throw b;}}; +style:"position: absolute; right: 10px; top: 10px; color: #666"},"X"),goog.dom.createDom("h2",{style:"color: #FFF5DB"},"Figwheel Says: Your code didn't compile."),goog.dom.createDom("div",{style:"font-size: 12px"},goog.dom.createDom("p",{style:"color: #D07D7D;"},"Keep trying. This page will auto-refresh when your code compiles successfully.")))))};figwheel.client._figwheel_version_="0.5.14";figwheel.client.js_stringify="undefined"!==typeof JSON&&cljs.core.some_QMARK_.call(null,JSON.stringify)?function(a){return[cljs.core.str("#js "),cljs.core.str(JSON.stringify(a,null," "))].join("")}:function(a){try{return""+cljs.core.str(a)}catch(b){if(b instanceof Error)return"Error: Unable to stringify";throw b;}}; figwheel.client.figwheel_repl_print=function(a){for(var b=[],c=arguments.length,d=0;;)if(d