From 4ecf3727bdb5aa790de00dc298ba9b14d5cf2257 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 1 Jul 2013 16:24:53 -0700 Subject: [PATCH 01/10] Generate an uberjar during deployment. --- Procfile | 2 +- README.md | 2 +- project.clj | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Procfile b/Procfile index 09a6c19..c4d5a3c 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: lein run +web: java $JVM_OPTS -cp target/tryclojure-standalone.jar clojure.main -m tryclojure.server diff --git a/README.md b/README.md index c7be349..3ec9350 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ TryClojure is a online Clojure REPL written using Noir and Chris Done's jquery c http://tryclj.com -If you want to run it, refer to https://github.com/Raynes/tryclojure/wiki/Running-Tryclojure +To run it locally, use `lein run`. ## Credits diff --git a/project.clj b/project.clj index 6a91931..a49a54c 100644 --- a/project.clj +++ b/project.clj @@ -4,5 +4,7 @@ [noir "1.3.0-beta10"] [commons-lang/commons-lang "2.5"] [clojail "1.0.6"]] - :jvm-opts ["-Djava.security.policy=example.policy""-Xmx80M"] + :jvm-opts ["-Djava.security.policy=example.policy" "-Xmx80M"] + :min-lein-version "2.0.0" + :uberjar-name "tryclojure-standalone.jar" :main tryclojure.server) From afa0845bb99ff027b7369654f3106453c691e33e Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Mon, 1 Jul 2013 16:43:43 -0700 Subject: [PATCH 02/10] Move security policy setting into Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index c4d5a3c..c39b2ec 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java $JVM_OPTS -cp target/tryclojure-standalone.jar clojure.main -m tryclojure.server +web: java -Djava.security.policy=example.policy $JVM_OPTS -cp target/tryclojure-standalone.jar clojure.main -m tryclojure.server From 7a6bf2b9a576e723843588cac366c08abd35134c Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 19 Mar 2014 11:53:42 -0400 Subject: [PATCH 03/10] Updated to latest version of jquery-console. --- .../public/javascript/jquery-console/README | 15 +- .../javascript/jquery-console/demo.html | 27 + .../jquery-console/jquery.console.js | 1308 +++++++++-------- 3 files changed, 746 insertions(+), 604 deletions(-) diff --git a/resources/public/javascript/jquery-console/README b/resources/public/javascript/jquery-console/README index 245420f..c5d2de3 100644 --- a/resources/public/javascript/jquery-console/README +++ b/resources/public/javascript/jquery-console/README @@ -1,6 +1,6 @@ INTRODUCTION -See demo.html. Or here: http://chrisdone.com/jquery-console/demo.html +See demo.html. Or here: http://chrisdone.com/jquery-console/ Options available: @@ -18,6 +18,10 @@ Options available: promptLabel string Prompt string like 'JavaScript> '. + cols integer the number of cols, this value is only + used by the command completion to format + the list of results. + commandValidate function When user hits return, validate whether to trigger commandHandle and re-prompt. @@ -30,6 +34,10 @@ Options available: to report a result of the command asynchronously. + commandComplete function Handle the command completion when the + tab key is pressed. It returns a list + of string completion suffixes. + animateScroll bool Whether to animate the scroll to top. Currently disabled. @@ -39,6 +47,9 @@ Options available: cancelHandle function Handle a user-signaled interrupt. + fadeOnReset bool Whether to trigger a fade in/out when + the console is reset. Defaults to true. + LICENSE Copyright 2010 Chris Done, Simon David Pratt. All rights reserved. @@ -68,5 +79,3 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - diff --git a/resources/public/javascript/jquery-console/demo.html b/resources/public/javascript/jquery-console/demo.html index 370ca73..7f85186 100644 --- a/resources/public/javascript/jquery-console/demo.html +++ b/resources/public/javascript/jquery-console/demo.html @@ -102,6 +102,33 @@ }, promptHistory:true }); + /* Fifth console */ + var console5 = $('
'); + $('body').append(console5); + var controller5 = console5.console({ + promptLabel: 'Complete> ', + commandHandle:function(line){ + if (line) { + return [{msg:"you typed " + line,className:"jquery-console-message-value"}]; + } else { + var m = "type a color among (" + this.colors.join(", ") + ")"; + return [{msg:m,className:"jquery-console-message-value"}]; + } + }, + colors: ["red","blue","green","black","yellow","white","grey"], + cols: 40, + completeHandle:function(prefix){ + var colors = this.colors; + var ret = []; + for (var i=0;i