Add version to katex object (#1279)

* Add version to katex object

Address khan/KaTeX#1190

* Update package.json before building
This commit is contained in:
Ethan Luis McDonough
2018-05-02 16:45:49 -05:00
committed by Erik Demaine
parent 5535d720dc
commit 2554f68297
2 changed files with 12 additions and 6 deletions

View File

@@ -102,6 +102,12 @@ git checkout "$BRANCH"
git pull
git checkout --detach
# Edit package.json and bower.json to the right version (see
# http://stackoverflow.com/a/22084103 for why we need the .bak file to make
# this mac & linux compatible)
sed -i.bak -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
rm -f package.json.bak
# Build generated files and add them to the repository (for bower)
git clean -fdx build dist
npm run dist
@@ -109,12 +115,6 @@ sed -i.bak -E '/^\/dist\/$/d' .gitignore
rm -f .gitignore.bak
git add .gitignore dist/
# Edit package.json and bower.json to the right version (see
# http://stackoverflow.com/a/22084103 for why we need the .bak file to make
# this mac & linux compatible)
sed -i.bak -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
rm -f package.json.bak
# Update the version number in CDN URLs included in the README files,
# and regenerate the Subresource Integrity hash for these files.
node update-sri.js "${VERSION}" README.md contrib/*/README.md dist/README.md