Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-plugin-clojurescript

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-clojurescript - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

book/jqconsole.css

67

book/runrepl.js
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 @@

6

index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc