-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Js modal window evaluation code #59
Conversation
…ets pre-loaded from the document
…eMirror theme - bug fixes
…ets pre-loaded from the document
…eMirror theme - bug fixes
Sorry about the previous PRs not coming through, I had some problems with wrong merges that @juanpedromoreno was kind enough to help me fix. Thanks man!! |
|
||
In order to use Kazari, you first need to include two scripts: | ||
|
||
* `sbt-microsites-js-opt.js`, containing the main code of the decorator plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we create only one built JS file so users have to only include one script? Not important, but would be nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to play with this idea a little bit to see if it works by creating a custom SBT command, it'd certaintly be nicer.
<link rel="stylesheet" href="monokai.css"> | ||
|
||
<script type="text/javascript"> | ||
var config = kazari.model.PluginConfig("http://localhost:8080/eval", "auth_token_string", "monokai") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have only one call to a function for decorating the code? It would be more idiomatic JS.
$(document).ready(function() {
kazari.decorateCode("http://localhost:8080/eval", "auth_token_string", "monokai")
})
If Scala.js doesn't allow this its fine as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's possible of course. We thought that we may be needing more parameters and that's the reason we put the configuration in a separate file. But yes, makes sense to do it as parameters in the function call being just 3.
Minor comments, other than that LGTM. Great job folks! Tests appear to be failing due to an error in the build.sbt file. |
…rs on the decorator function
…lting scripts from the Scala.JS build process into a single file
@juanpedromoreno @dialelo I've made several changes in the project to include two sbt commands that generate a single file script instead of relying on the two generated by Scala.JS (one command to use the fast process fastOptJS, and the other to use the optimized fullOptJS). Could you check it out please? |
@@ -30,16 +30,14 @@ lazy val pluginSettings = Seq( | |||
|
|||
lazy val micrositeSettings = Seq( | |||
micrositeName := "sbt-microsites", | |||
micrositeDescription := "An sbt plugin to create awesome microsites for your project", | |||
micrositeDescription := "A sbt plugin to create awesome microsites for your project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be An
;)
@jdesiloniz I think you didn't pushed your changes :/, at least, I can't see them |
@juanpedromoreno fixed! |
LGTM! |
This PR includes code to the Kazari plugin that allows users to launch a modal window to edit every code snippet included in the documentation, and to request the remote evaluator to run those. This is still WIP, with no design and missing functionalities (i.e.: save modified code as a GitHub gist). Also included is the use of the evaluator client to perform requests to the remote evaluator, instead of using other libraries or jQuery ajax calls.
Also included is a first draft of the Kazari documentation, to keep track of the functionalities and little details to take into account when using it on an existing documentation.
Could you please review @juanpedromoreno @raulraja @dialelo? Thanks!