gitbook-plugin-clojurescript
Advanced tools
Comparing version 0.0.7 to 0.0.8
require(["gitbook"], function(gitbook) { | ||
var init = function() { | ||
goog.require('himera.client.repl'); | ||
himera.client.repl.go(); | ||
goog.require('cljs.core'); | ||
goog.provide('cljs.user'); | ||
var header = 'Clojure REPL!\n'; | ||
window.jqconsole = $('#console').jqconsole(header, 'user=> '); | ||
// Abort prompt on Ctrl+Z. | ||
jqconsole.RegisterShortcut('Z', function() { | ||
jqconsole.AbortPrompt(); | ||
handler(); | ||
}); | ||
// Move to line start Ctrl+A. | ||
jqconsole.RegisterShortcut('A', function() { | ||
jqconsole.MoveToStart(); | ||
handler(); | ||
}); | ||
// Move to line end Ctrl+E. | ||
jqconsole.RegisterShortcut('E', function() { | ||
jqconsole.MoveToEnd(); | ||
handler(); | ||
}); | ||
jqconsole.RegisterShortcut('l', function() { | ||
jqconsole.Clear(); | ||
handler(); | ||
}); | ||
// Register paren matching | ||
jqconsole.RegisterMatching('{', '}', 'brace'); | ||
jqconsole.RegisterMatching('(', ')', 'paran'); | ||
jqconsole.RegisterMatching('[', ']', 'bracket'); | ||
function runClojure(code) { | ||
var data; | ||
var url = "http://clojurebyexample-repl.herokuapp.com/eval.json"; | ||
$.ajax({ | ||
url: url, | ||
data: { expr: code }, | ||
async: false, | ||
success: function(res) { data = res; } | ||
}); | ||
return data; | ||
}; | ||
// Handle a command. | ||
var handler = function(command) { | ||
if (command) { | ||
var resp = runClojure(command); | ||
if (resp.error) { | ||
jqconsole.Write('ERROR: ' + resp.message + '\n', 'jqconsole-error'); | ||
} else { | ||
jqconsole.Write(resp.result + '\n'); | ||
} | ||
} | ||
jqconsole.Prompt(true, handler, function(command) { | ||
// Continue line if can't compile the command. | ||
return false; | ||
}); | ||
}; | ||
// Initiate the first prompt. | ||
handler(); | ||
}; | ||
@@ -8,0 +67,0 @@ |
@@ -5,8 +5,8 @@ module.exports = { | ||
js: [ | ||
"jquery.console.js", | ||
"repl.js", | ||
"jqconsole.min.js", | ||
//"repl-jqconsole.js" | ||
"runrepl.js" | ||
], | ||
css: [ | ||
"himera.css" | ||
"jqconsole.css" | ||
], | ||
@@ -13,0 +13,0 @@ html: { |
{ | ||
"name": "gitbook-plugin-clojurescript", | ||
"description": "A Gitbook plugin for running a clojurescript REPA Gitbook plugin for running a clojurescript REPL", | ||
"main": "index.js", | ||
"version": "0.0.7", | ||
"engines": { | ||
"gitbook": "*" | ||
}, | ||
"homepage": "https://github.com/prakhar1989/gitbook-plugin-clojurescript", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/prakhar1989/gitbook-plugin-clojurescript.git" | ||
}, | ||
"license": "Apache 2", | ||
"bugs": { | ||
"url": "https://github.com/prakhar1989/gitbook-plugin-clojurescript/issues" | ||
} | ||
"name": "gitbook-plugin-clojurescript", | ||
"description": "A Gitbook plugin for running a clojurescript REPA Gitbook plugin for running a clojurescript REPL", | ||
"main": "index.js", | ||
"version": "0.0.8", | ||
"engines": { | ||
"gitbook": "*" | ||
}, | ||
"homepage": "https://github.com/prakhar1989/gitbook-plugin-clojurescript", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/prakhar1989/gitbook-plugin-clojurescript.git" | ||
}, | ||
"license": "Apache 2", | ||
"bugs": { | ||
"url": "https://github.com/prakhar1989/gitbook-plugin-clojurescript/issues" | ||
}, | ||
"dependencies": { | ||
"gulp": "^3.8.10", | ||
"gulp-concat": "^2.4.3", | ||
"gulp-minify-css": "^0.4.2", | ||
"gulp-rename": "^1.2.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12
53152
4
379
1
+ Addedgulp@^3.8.10
+ Addedgulp-concat@^2.4.3
+ Addedgulp-minify-css@^0.4.2
+ Addedgulp-rename@^1.2.0
+ Addedamdefine@1.0.1(transitive)
+ Addedansi-gray@0.1.1(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedansi-wrap@0.1.0(transitive)
+ Addedarchy@1.0.0(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-differ@1.0.0(transitive)
+ Addedarray-each@1.0.1(transitive)
+ Addedarray-slice@1.1.0(transitive)
+ Addedarray-uniq@1.0.3(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbeeper@1.1.1(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@2.3.2(transitive)
+ Addedbufferstreams@1.1.3(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedclean-css@3.4.28(transitive)
+ Addedclone@0.2.01.0.42.1.2(transitive)
+ Addedclone-buffer@1.0.0(transitive)
+ Addedclone-stats@0.0.11.0.0(transitive)
+ Addedcloneable-readable@1.1.3(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcolor-support@1.1.3(transitive)
+ Addedcommander@2.8.1(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconcat-with-sourcemaps@1.1.0(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddateformat@2.2.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefaults@1.0.4(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addeddeprecated@0.0.1(transitive)
+ Addeddetect-file@1.0.0(transitive)
+ Addedduplexer2@0.0.2(transitive)
+ Addedend-of-stream@0.1.5(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedexpand-tilde@2.0.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfancy-log@1.3.3(transitive)
+ Addedfill-range@4.0.0(transitive)
+ Addedfind-index@0.1.1(transitive)
+ Addedfindup-sync@2.0.0(transitive)
+ Addedfined@1.2.0(transitive)
+ Addedfirst-chunk-stream@1.0.0(transitive)
+ Addedflagged-respawn@1.0.1(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfor-own@1.0.0(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgaze@0.5.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedglob@3.1.214.5.3(transitive)
+ Addedglob-stream@3.1.18(transitive)
+ Addedglob-watcher@0.0.6(transitive)
+ Addedglob2base@0.0.12(transitive)
+ Addedglobal-modules@1.0.0(transitive)
+ Addedglobal-prefix@1.0.2(transitive)
+ Addedglobule@0.1.0(transitive)
+ Addedglogg@1.0.2(transitive)
+ Addedgraceful-fs@1.2.33.0.12(transitive)
+ Addedgraceful-readlink@1.0.1(transitive)
+ Addedgulp@3.9.1(transitive)
+ Addedgulp-concat@2.6.1(transitive)
+ Addedgulp-minify-css@0.4.6(transitive)
+ Addedgulp-rename@1.4.0(transitive)
+ Addedgulp-util@3.0.8(transitive)
+ Addedgulplog@1.0.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-gulplog@0.1.0(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@1.0.22.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedinterpret@1.4.0(transitive)
+ Addedis-absolute@1.0.0(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@3.1.0(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-relative@1.0.0(transitive)
+ Addedis-unc-path@1.0.0(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedliftoff@2.5.0(transitive)
+ Addedlodash@1.0.2(transitive)
+ Addedlodash._basecopy@3.0.1(transitive)
+ Addedlodash._basetostring@3.0.1(transitive)
+ Addedlodash._basevalues@3.0.0(transitive)
+ Addedlodash._getnative@3.9.1(transitive)
+ Addedlodash._isiterateecall@3.0.9(transitive)
+ Addedlodash._reescape@3.0.0(transitive)
+ Addedlodash._reevaluate@3.0.0(transitive)
+ Addedlodash._reinterpolate@3.0.0(transitive)
+ Addedlodash._root@3.0.1(transitive)
+ Addedlodash.escape@3.2.0(transitive)
+ Addedlodash.isarguments@3.1.0(transitive)
+ Addedlodash.isarray@3.0.4(transitive)
+ Addedlodash.keys@3.1.2(transitive)
+ Addedlodash.restparam@3.6.1(transitive)
+ Addedlodash.template@3.6.2(transitive)
+ Addedlodash.templatesettings@3.1.1(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedmake-iterator@1.0.1(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmemory-cache@0.0.5(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedminimatch@0.2.142.0.10(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addedmultipipe@0.1.2(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addednatives@1.1.6(transitive)
+ Addedobject-assign@3.0.0(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.defaults@1.1.0(transitive)
+ Addedobject.map@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedonce@1.3.3(transitive)
+ Addedorchestrator@0.3.8(transitive)
+ Addedordered-read-streams@0.1.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedparse-filepath@1.0.2(transitive)
+ Addedparse-node-version@1.0.1(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-root@0.1.1(transitive)
+ Addedpath-root-regex@0.1.2(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedpretty-hrtime@1.0.3(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@1.0.341.1.142.3.8(transitive)
+ Addedrechoir@0.6.2(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedreplace-ext@0.0.11.0.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedresolve-dir@1.0.1(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsemver@4.3.6(transitive)
+ Addedsequencify@0.0.7(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsigmund@1.0.1(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map@0.1.430.4.40.5.70.6.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsparkles@1.0.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstream-consume@0.1.1(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-bom@1.0.0(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedthrough2@0.6.52.0.5(transitive)
+ Addedtildify@1.2.0(transitive)
+ Addedtime-stamp@1.1.0(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedunc-path-regex@0.1.2(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunique-stream@1.0.0(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addeduser-home@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedv8flags@2.1.1(transitive)
+ Addedvinyl@0.4.60.5.32.2.1(transitive)
+ Addedvinyl-fs@0.3.14(transitive)
+ Addedvinyl-sourcemaps-apply@0.1.4(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)