Makefile: Wipe node_modules if not properly installed

If `make server` is already running (or port 9292 is someotherhow
already in use), and I run `make server` in a fresh clone, the test
server gets an EADDRINUSE and quits. However, it first starts up `make
test` in parallel, which does an `npm install`, which gets aborted
partway through. On my machine, this race condition results in the
packages seemingly all installed under `node_modules/*`, but not the
executables like `node_modules/.bin/lessc`.

The problem arises when subsequently building again (e.g. `PORT=9393
make server`), which runs `npm install` again, this time to completion.
`npm` sees all the packages and installed under `node_modules/*` and
doesn't try to complete the installation and install the
`node_modules/.bin/*` executables (it probably doesn't want to do a full
integrity check: https://github.com/npm/npm/issues/15562 ), instead
quitting and reports success, but the Makefile then fails when it tries
to do `node_modules/.bin/lessc`.

https://mathquill.slack.com/archives/mathquill/p1482616486000235
1 file changed
tree: ab6f6667996d85a48ff8243b0cd24776ef3319df
  1. docs/
  2. script/
  3. src/
  4. test/
  5. .gitattributes
  6. .gitignore
  7. BUILDING
  8. CHANGELOG.md
  9. circle.yml
  10. Makefile
  11. mkdocs.yml
  12. package.json
  13. quickstart.html
  14. README.md
README.md

MathQuill

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.)

Getting Started

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.

Docs

Most documentation for MathQuill is located on ReadTheDocs.

Some older documentation still exists on the Wiki.

Open-Source License

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)