Add "files" array to package.json, for `npm publish`

More specifically, for [`npm pack`]. By default NPM ignores anything in
.gitignore, including build/; the "files" array overrides that:
    https://docs.npmjs.com/files/package.json#files

Note that the patterns deliberately exclude MathQuill-Basic and
mathquill.test.js.

Also, since the Pjs source is "baked-into" mathquill.js, the built file
we're publishing, Pjs isn't really a runtime dependency, it's a build-
time dependency and therefore should be in "devDependencies" not
"dependencies". The only real dependency is jQuery, but mentioning that
in package.json will only make sense once we start publishing in module
formats like CommonJS etc that can actually declare dependencies.

[`npm pack`]: https://docs.npmjs.com/cli/pack

--

Why the "files" array over alternatives?

For comparison, the current package on NPM named 'mathquill' (control
of which has been relinquished to me) uses a .npmignore to override the
.gitignore:
    https://github.com/wensheng/umeditor-mathquill/commit/4a62eb9cde34d15288d4d212292802726d9811c2#diff-0fd4ef892d9d4990033701887c2f9bcc
and the NPM package 'node-mathquill' removed most of build/ from
the .gitignore and started checking it into Git:
    https://github.com/FB-PLP/mathquill/commit/57fbd35b53ac07880f1b78b9333b1c51762bb1fa

The latter seems much worse to me than the former, I am very against
checking in built files into *source* control:
    https://github.com/mathquill/mathquill/pull/436#issuecomment-120233783
    https://medium.com/@kentcdodds/why-i-don-t-commit-generated-files-to-master-a4d76382564#.vwsyqkmns

I think the "files" array is even better than .npmignore, less clutter
in the package root and there are fewer files we want to include than
exclude so a whitelist is more convenient than a blacklist.
1 file changed
tree: e51d6ad5b609b9577acc61f09ae9d1468f1ba9a8
  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. 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)