Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial ideas for REPL support (#11).
Things are actually in a vaguely working form, but I need to write a lot of documentation and clean up the advanced example more before this is ready for prime-time.
- Loading branch information
Showing
14 changed files
with
251 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
if (phantom.args.length != 1) { | |||
console.log('Expected a target URL parameter.'); | |||
phantom.exit(1); | |||
} | |||
|
|||
var page = new WebPage(); | |||
var url = phantom.args[0]; | |||
|
|||
page.open(url, function (status) { | |||
if (status != "success") { | |||
console.log('Failed to open ' + url); | |||
phantom.exit(1); | |||
} | |||
|
|||
// TODO: Should anything else happen here? | |||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
example-projects/advanced/resources/public/html/naked.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
<html> | |||
<body> | |||
<script src="../js/main-debug.js"></script> | |||
<script> | |||
example.repl.connect(); | |||
</script> | |||
This is just a dummy HTML file to connect to the REPL. | |||
Don't close this window until you're done with the REPL. | |||
</body> | |||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
(ns example.repl | |||
(:require | |||
[clojure.browser.repl :as repl])) | |||
|
|||
(defn ^:export connect [] | |||
(repl/connect "http://localhost:9000/repl")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.