Skip to content

Commit

Permalink
added prettier pretty-printing/reformatting make target, which shou…
Browse files Browse the repository at this point in the history
…ld help us produce better readable & debuggable MathJax library files, thanks to One Statement Per Line and other very sensible formattings...
  • Loading branch information
GerHobbelt committed Sep 13, 2018
1 parent e33dd66 commit 9441f98
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

node_modules/

14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ help:
@echo "make pack"
@echo " Run MathJax packer"
@echo ""
@echo "make combine"
@echo " Run MathJax combiner, which combines the packed library source files"
@echo ""
@echo "make prettier"
@echo " Run MathJax prettifier, which pretty-prints the combined library files"
@echo ""
@echo "make all"
@echo " Regenerate the MathJax library files (pack, combine & prettify)"
@echo ""
@echo "make clean"
@echo " Remove temporary directories and files."
@echo ""
Expand Down Expand Up @@ -64,6 +73,9 @@ pack: config
combine: config
$(MAKE) -C combiner all

prettier:
prettier --write --print-width 120 $(MATHJAXDIR)/mathjax/MathJax.js $(MATHJAXDIR)/mathjax/config/*.js

misc: operator-dictionary MML-entities

MML-entities: config
Expand All @@ -80,5 +92,5 @@ clean-destination: config
# this assumes MATHJAXDIR is a *relative path* for the perl tools in combiner and packer:
-rm -rf $(MATHJAXDIR)/mathjax/config/ $(MATHJAXDIR)/mathjax/localization/ $(MATHJAXDIR)/mathjax/extensions/ $(MATHJAXDIR)/mathjax/jax/

.PHONY: help fonts config pack combine clean clean-destination all
.PHONY: help fonts config pack combine clean clean-destination prettier misc operator-dictionary MML-entities all

13 changes: 11 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gerhobbelt/mathjax-dev",
"version": "1.0.1-6",
"version": "1.0.1-7",
"description": "development environment for MathJax",
"repository": "[email protected]:GerHobbelt/MathJax-dev.git",
"scripts": {
Expand All @@ -11,5 +11,8 @@
"mathjax"
],
"author": "mathjax.org",
"license": "MIT"
"license": "MIT",
"devDependencies": {
"prettier": "1.14.2"
}
}

0 comments on commit 9441f98

Please sign in to comment.