add mathjax submodule
This commit is contained in:
parent
861acbbe0a
commit
cdcd0ce68d
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "contrib/js/contrib/MathJax"]
|
||||||
|
path = contrib/js/contrib/MathJax
|
||||||
|
url = https://github.com/mathjax/MathJax
|
23
build-js.sh
23
build-js.sh
@ -12,13 +12,26 @@ if [ ! -f $GOPATH/bin/minify ]; then
|
|||||||
echo "set up minifiy"
|
echo "set up minifiy"
|
||||||
go get -v github.com/tdewolff/minify/cmd/minify
|
go get -v github.com/tdewolff/minify/cmd/minify
|
||||||
fi
|
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 "
|
echo -e "//For source code and license information please check https://github.com/majestrate/nntpchan \n" > $outfile
|
||||||
cat ./contrib/js/main.js_ | $GOPATH/bin/minify --mime=text/javascript >> ./contrib/static/nntpchan.js
|
|
||||||
|
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
|
for f in ./contrib/js/*.js ; do
|
||||||
echo -n "."
|
mini $f $outfile
|
||||||
cat $f | $GOPATH/bin/minify --mime=text/javascript >> ./contrib/static/nntpchan.js
|
|
||||||
done
|
done
|
||||||
echo "ok"
|
echo "ok"
|
||||||
|
1
contrib/js/contrib/MathJax
Submodule
1
contrib/js/contrib/MathJax
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d4ab1b35c96dd964eaa9e1ed2c86e39fffbdacf6
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user