Archived
1
0

add mathjax submodule

This commit is contained in:
Jeff Becker 2016-04-30 09:58:21 -04:00
parent 861acbbe0a
commit cdcd0ce68d
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
4 changed files with 49 additions and 12 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "contrib/js/contrib/MathJax"]
path = contrib/js/contrib/MathJax
url = https://github.com/mathjax/MathJax

View File

@ -12,13 +12,26 @@ if [ ! -f $GOPATH/bin/minify ]; then
echo "set up minifiy"
go get -v github.com/tdewolff/minify/cmd/minify
fi
outfile=$(readlink -e ./contrib/static/nntpchan.js)
echo -e "//For source code and license information please check https://github.com/majestrate/nntpchan \n" > ./contrib/static/nntpchan.js
mini() {
echo "minify $1"
echo "" >> $2
echo "/* $1 */" >> $2
$GOPATH/bin/minify --mime=text/javascript >> $2 < $1
}
echo -n "minify "
cat ./contrib/js/main.js_ | $GOPATH/bin/minify --mime=text/javascript >> ./contrib/static/nntpchan.js
echo -e "//For source code and license information please check https://github.com/majestrate/nntpchan \n" > $outfile
mini ./contrib/js/main.js_ $outfile
if [ ! -e ./contrib/js/contrib/MathJax/ ] ; then
git submodule --init update .
fi
mini ./contrib/js/contrib/MathJax/MathJax.js $outfile
# local js
for f in ./contrib/js/*.js ; do
echo -n "."
cat $f | $GOPATH/bin/minify --mime=text/javascript >> ./contrib/static/nntpchan.js
mini $f $outfile
done
echo "ok"

@ -0,0 +1 @@
Subproject commit d4ab1b35c96dd964eaa9e1ed2c86e39fffbdacf6

File diff suppressed because one or more lines are too long