commit | 473e3f621c8232eb4bde0a6612919cfc271ee18f | [log] [tgz] |
---|---|---|
author | Han Seoul-Oh <laughinghan@gmail.com> | Sat Dec 24 17:58:43 2016 -0500 |
committer | Han Seoul-Oh <laughinghan@gmail.com> | Mon Jan 23 16:14:14 2017 -0800 |
tree | 533e7b4fded83c07099e3fd1babc5d9b20fcde0e | |
parent | 53ae5af9e5882837df9cf1e5a4cd5af7e56fecd4 [diff] |
CI: Convert script/screenshots.js to "promise chain" style ...of `wd` (our Node.js client for webdriver) There's fewer indents and callbacks, so it's more readable overall. There's still lots of indents though because in order to use info from previous steps, have to use .then() callbacks, promises don't eliminate callbacks, just uniformize them and in particular, uniformize error-handling: Instead of all the `if (err) log(err);`s, can have just one .fail() handler at the end of the chain. On the other hand, injecting logging steps in the chain is more annoying, had to define a `willLog()` promise to log when each step completes. We also use the fancy-ish Q feature .spread() to parallelize getting scrollHeight and clientHeight (which requires combining logging steps), not sure if we should be doing more or less of that. For convenience, we move assembling the screenshot filename a little earlier, to the nearest .then(). Also, unfortunately, we have to manually wrap Node's filesystem API in a promise; the builtin Promise should be available in Node 4+. Recommend -w to view diff.
by Han, Jeanine, and Mary (maintainers@mathquill.com)
MathQuill is a web formula editor designed to make typing math easy and beautiful.
The MathQuill project is supported by its partners. We hold ourselves to a compassionate Code of Conduct.
MathQuill is resuming active development and we‘re committed to getting things running smoothly. Find a dusty corner? Let us know in Slack. (Prefer IRC? We’re #mathquill
on Freenode.)
MathQuill has a simple interface. This brief example creates a MathQuill element and renders, then reads a given input:
var htmlElement = document.getElementById('some_id'); var config = { handlers: { edit: function(){ ... } }, restrictMismatchedBrackets: true }; var mathField = MQ.MathField(htmlElement, config); mathField.latex('2^{\\frac{3}{2}}'); // Renders the given LaTeX in the MathQuill field mathField.latex(); // => '2^{\\frac{3}{2}}'
Check out our Getting Started Guide for setup instructions and basic MathQuill usage.
Most documentation for MathQuill is located on ReadTheDocs.
Some older documentation still exists on the Wiki.
The Source Code Form of MathQuill is subject to the terms of the Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/
The quick-and-dirty is you can do whatever if modifications to MathQuill are in public GitHub forks. (Other ways to publicize modifications are also fine, as are private use modifications. See also: MPL 2.0 FAQ)